Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting primary key after an insert
Message
From
08/06/2006 11:18:47
 
 
To
08/06/2006 11:09:54
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01127217
Message ID:
01127856
Views:
23
>>Here is some VB.NET sample that demonstrates how to get AUTOINC value back after Insert:
>
>Thanks, this is some very interesting good. In the first approach, as the value of the auto incremental field is returned in a secondary command into the adapter, does this guarantee that the value returned is in fact the incremental key that was generated by the insert command in this code?
>

Yes, as long as GETAUTOINCVALUE(0) is executed immediately after INSERT and through the same connection.

>By that, I mean that if two users are executing this code, is there a chance that the value returned is the value of the insert of the other user? >

No, no chance.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform