General information
Category:
Visual FoxPro and .NET
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only