Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to retrieve SQL Identity Column values?
Message
 
 
À
02/10/2001 10:19:08
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00562994
Message ID:
00563017
Vues:
28
>I'm using VFP 6 and SQL 2000. Almost all SQL tables have an identity column for the pk. When I add a new record to a view, is there a direct way to retrieve the PK value that was assigned by SQL? I currently do some pretty serious gyrations to pull it off. Must be a quicker way...
>
>TIA

You can retrive the SQL Servers global variable @@IDENTITY or SCOPE_IDENTITY()/ IDENT_CURRENT() functions value. See in BOL wich one is appropriate in your situation.
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform