Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to return the autoinc field when inserted in SQL ser
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01120919
Message ID:
01121352
Vues:
18
Borislav,

Personally I would never attempt to pull back an identity via a second database call. IMHO they are only safe to use when called inside the context of an SP to do the insert.

>Don't get me wrong here. I didn't say @@IDENTITY is the best solution. I just said that when you use CA and insert a new records, then issue TableUpdate(...) INSERT command and Refresh command are in two different batches. You can't use SCOPE_IDENTITY() because of that.
>You are right about IDENT_CURRENT, somehow I didn't read carefully last few words (these you bold), or maybe I didn't want to read them. Use of IDENT_CURRENT is dangerous in that matter.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform