Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Of @@identity and surrogate keys - HELP!
Message
 
À
09/12/1999 16:50:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00301334
Message ID:
00301382
Vues:
30
Ken:

You can create a stored procedure that generates the next available key then return it to the client with code like this:

lnKey = 0
= sqlexec(lnhandle, "{CALL spGetKey (?@lnKey)}")

or

What I do is get a key at the start of an application using the above code, then each time I need a new key I concatenate it with a key generated on the client. This way you save round trips to the server each time you need a new key.

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

Click here to load this message in the networking platform