Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to return the autoinc field when inserted in SQL ser
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01120919
Message ID:
01121352
Views:
8
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
Previous
Reply
Map
View

Click here to load this message in the networking platform