Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto Increment PK : VFP with SQL server as backend
Message
De
16/02/2012 19:09:01
Kam Lee
SUNY-Health Science Center
Brooklyn, New York, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Auto Increment PK : VFP with SQL server as backend
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP
Network:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01535625
Message ID:
01535625
Vues:
102
Hi,
I have problem with the auto increment field when switching from Access to SQL server as backend.
I am not getting the new id from the sql server whereas I have no problem when I get the new id from Access

** code to get the new id (key) from the SQL server
oRecordset.AddNew
?oRecordset.Fields("id").Value && empty string; this used to be working when accessing Access

*This does not work neither:
oRecordset.AddNew
oRecordset.Update
?oRecordset.Fields("id").Value && returns empty string

What should I do to get the id field in the vfp program?

Thanks,
Kam.
Répondre
Fil
Voir

Click here to load this message in the networking platform