Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting primary key after an insert
Message
From
22/06/2006 11:11:36
 
 
To
22/06/2006 05:42:22
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:
01130828
Views:
19
>I'm not sure what you mean, didn't you have a requirement to know the primary key of the record you just created?

Yes, this has been resolved. It is now in the framework. So, if I need it, after and insert, it now looks like this:
loDataProvider.ParameterClear()
loDataProvider.ParameterAdd("NoMember", lnNoMember)
loDataProvider.ParameterAdd("IP", oApp.cIP)
If Not loDataProvider.SQLInsert("INSERT INTO AffiliateHit (NoMember,IP) VALUES (?,?)", oApp.aConnection(1)) Then
   Return False
End If

lnPrimaryKey=loDataProvider.nPrimaryKey
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform