Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique Identifiers in SQL 6.5 Back End Tables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00335343
Message ID:
00335357
Vues:
14
>1. Use the "UniqueIdentifier" data type within SQL Server and the "Identity Increment" property. The problem lies in ensuring that I return a GUARANTEED unique record id.

You can't do that. Auto increment only works with integer fields.

I think the best bet is to use the UniqueIdentifier data type for you PK... then generate the GUID value on the client side before inserting your record. (If you are using remote views, the equivelent data type would be Binary Character 16 bytes.)

Just for the heck of it use the default value of NewID() in SQL Server which will create a GUID.

There is a function to create GUID values on the Wiki.

The reason I like this method is because you don't have to make a trip to the server to get an id value.

BOb
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform