Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting primary key after an insert
Message
De
06/06/2006 01:04:29
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01127217
Message ID:
01127267
Vues:
20
>Can you use this SQL "SELECT GETAUTOINCVALUE(0) FROM OneRecordCursor" ?

You cannot use a cursor in OleDB. Also, such a command would need to be executed at the same time the insert is done, which I don't think is possible under this environment. What I do for now is to select the last record added to the table from that user. For any new record in a table, I have a field AddUser which is maintained. So, I select the last one and this gives me the record ID. But, I don't like this approach. I really something at the insert level.
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform