Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get the SQL server identity value before commit
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00777706
Message ID:
00777714
Vues:
7
>Anyone know if it’s possible to get the value for an SQL server identify field before a transaction is completed.
>
>Basically I want to add a record to a table, get its PK value which is assigned in SQL server. Then add to some other tables and if everything goes well, commit the transaction to all tables.
>
>Thanks,

You can use SCOPE_IDENTITY( ) or @@Identity to get last identity value. See BOL for details and limitations of each.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform