Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP with SQL Server -- Pkey
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00464309
Message ID:
00464379
Vues:
20
>>PMFJI but, you need to be careful when reading the PK in a separate call from the insert statement. @@IDENTITY returns the last inserted identity value. If several users are inserting records at the same time or several records are being added you may not get the right PK value.
>
>Are you sure this correct? I do not use Identity columns, but I thought the @@IDENTITY value was returned only for the current connection. In other words, INSERTs by other connections don't affect the value of the INSERT on my connection.

You're right. The multiuser case does not apply here. But inserting multiple records would be a problem.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform