fguihen Posted November 21, 2005 Posted November 21, 2005 when a user wants to add a new patient to the database, i want to autogenerate a primary key to identify the patient. how do i autogenerate this in c#, so that i know it wont clash with any records already in the database? Quote
laredo512 Posted November 22, 2005 Posted November 22, 2005 In VB.NET, I would used the GUID... I don't know what the C# equivalent is but this is what it looks like in VB.NET: Dim PKey as GUID PKey = PKey.newguid() Quote Laredo512 * using VS.NET Pro 2003 *
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.