Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
General MM .NET question
Message
De
09/03/2009 08:59:58
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
07/03/2009 00:07:54
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01384040
Message ID:
01386598
Vues:
38
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform