General information
Title:
Auto Increment PK : VFP with SQL server as backend
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.
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