Wednesday, March 7, 2012

NewID

Hello,

I use VB.Net and SQL CE 2.0. I'd like to start using UniqueIdentifier fields as my primary keys.

I saw that this would return a NewID value

System.Guid.NewGuid().ToString()

however, it is not supported in Compact Framework. So how can one obtain the next NewId()?

Thank you.

NewGuid() is supported in .NET CF 2.0. You can also have a look at this article: http://msdn2.microsoft.com/en-us/library/aa446557.aspx - Generating GUIDs on the Pocket PC

No comments:

Post a Comment