Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
General MM .NET question
Message
From
09/03/2009 08:59:58
Timothy Bryan
Sharpline Consultants
Conroe, Texas, United States
 
 
To
07/03/2009 00:07:54
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01384040
Message ID:
01386598
Views:
39
Hi Sam,

Your SQL data type would be Unique Identifier and you can generate a guid as the default in your HookSetDefaultValues with this
entity.RowPK = Guid.NewGuid();

Tim


>
>I want to use guid's as the primary keys in my SQL tables and as I add a new row, I want to generate a guid for the new row in the DataTable. This should solve the problem of adding multiple new rows in the DataTable before saving them all to the backend SQL database.
>
>How do I generate the guid's? What SQL Data Type should the guid column be?
>
>Sam
>
Timothy Bryan
Previous
Reply
Map
View

Click here to load this message in the networking platform