Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get autoinc value back
Message
From
14/09/2004 19:03:32
 
 
To
14/09/2004 10:12:28
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro and .NET
Miscellaneous
Thread ID:
00941893
Message ID:
00942167
Views:
19
>I'm connecting to VFP DBC from a .NET applicaiton using the OLEDB provider. When I do an insert into a table using an autoinc field, I need to get the autoinc value back. In SQL Server I could use the SCOPE_IDENTITY feature, but I'm not finding this capability in VFP...
>
>What is the most reliable way to do this? Keep in mind that this is going to be in a multi-user environment so I want to make sure I get the value back from the insert I just did, not someone elses insert that may have happend right after mine.

Hi Dan,

I believe there is only one option in VFP8 - query the value using an alternative candidate key. VFP9 will have GETAUTOINCVALUE() function for this purpose.

Thanks,
Aleksey.
Previous
Reply
Map
View

Click here to load this message in the networking platform