[resolved] how to generate uuid

One Star

[resolved] how to generate uuid

I want to generate random UUID numbers in a certain format for insertion in a database - what is the recommended procedure to achieve this?
I have been ask to use routines but it does not work Theres a field in file called id and i wan to generate random uuid for every row to put it in my database

Accepted Solutions
Employee

Re: [resolved] how to generate uuid

Simple method to include in your routine...
public static String createUUID() {
return (java.util.UUID.randomUUID()).toString();
}

of course you could always just put (java.util.UUID.randomUUID()).toString() in the ID column in, say, a tMAP.

All Replies
Employee

Re: [resolved] how to generate uuid

Simple method to include in your routine...
public static String createUUID() {
return (java.util.UUID.randomUUID()).toString();
}

of course you could always just put (java.util.UUID.randomUUID()).toString() in the ID column in, say, a tMAP.
One Star

Re: [resolved] how to generate uuid

thanks so much Smiley Very Happy