I have a database table that uses Sql Server 2005’s uniqueidentifier column.
I know how to create GUIDs in C#…
string newid = System.Guid.NewGuid().ToString();
However, the application that is inserting into this database is running Java.
Is there a way to generate Sql-Server-compatible GUIDs using Java code?
(NOTE: generating the GUIDs on the Sql Server side is not an option in this case)
Is this – http://johannburkard.de/software/uuid/ – equivalent to the C# version?
Why not simply use the built in class java.util.UUID, assuming you are using at least Java 1.5