Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Primary Keys
Message
De
02/08/1999 13:51:00
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Titre:
Divers
Thread ID:
00248872
Message ID:
00248920
Vues:
21
>I have MS-SQL assigning a unique identifier as a primary key in the back end. I'm linking to the tables via remote views. My problem is when I save an Added record I don't have the primary key yet so if the user makes an immediate change on the added record an update conflict error occurs. I can do a REQUERY() after the save, but this seems alot just to get the primary key back to the front-end and the Refresh() function won't work as far as I can tell. I'd like to hear what you all are doing in this case.
>
>Thanks in advance.

I believe the accepted method is to query the server for the @@Identity value which should return the last primary key value assigned. However, If I remember correctly, I think there are issues with this. You might want to search the MS KB for "@@Identity" for more info.


Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform