This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Converting SQLServer 2005 uniqueIdentifier column to java.util.UUID

 
Sander Evanfield
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I have a uniqueidentifier column in SQLServer 5 table which is retrieved through JDBC (Driver Sparta)

String 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 IllegalStateException 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: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic