A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Converting SQLServer 2005 uniqueIdentifier column to java.util.UUID
Joined: Oct 15, 2004
Nov 02, 2010 21:16:36
I have a uniqueidentifier column in SQLServer 5 table which is retrieved through
uniqueColumn = resultSet.getString(1);
actual column in database has value 067e6162-3b6f-4ae2-a171-2470b63dff00
uniqueColumn holds 067e61623b6f4ae2a1712470b63dff00
When I try to get a UUID from uniqueColumn using UUID.fromString(uniqueColumn) I get
as unique column does not hold UUID representation.
Am i missing something here or it is a known bug I can put the dashes in the string and it should work but need an elegant solution supported by JDBC
I agree. Here's the link:
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Converting SQLServer 2005 uniqueIdentifier column to java.util.UUID
Oracle or SQL Server?
][SQLServer 2000 Driver for JDBC]ResultSet can not re-read
How to view the Datatypes of the Columns of a Table in SQLSERVER
JDBC Error MSSQL Uniqueidentifier
Uniqueidentifier column type is not supporting in prepared statement
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013