Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ADO Error: identity cannot be determined ...
Message
From
29/01/2001 14:58:35
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
ADO Error: identity cannot be determined ...
Miscellaneous
Thread ID:
00469924
Message ID:
00469924
Views:
196
I am receiving this error msg, using ADO with SQL Server 7 thru VFP:
'OLE Idispatch exception code 0 Identity cannot be determined for newly inserted rows'
This occurs upon trying to save the 1st change made to a newly added record to an ADO recordset. My problem with this is that it DOES know the id for that record, since I can see it in the debugger for the object in question. I encapsulated the ADO recordset object in a custom class, and actually when you do an AddNew() the method looks like:
this.myrecordset.AddNew()
this.myrecordset.update()
this.SetValues()
Where SetValues() sets properties of the custom object to match the underlying recordset data. This error can be avoided by moving off the new record in the recordset and back to it.

This strikes me as if the ADO recordset Update() method is not really doing anything unless you move the 'record pointer' (I don't know what the ADO equivalent of a record pointer is..<g>)

Does anyone have any thoughts on this?

Thanks,
Jim Newsom
IT Director, ICG Inc.
Next
Reply
Map
View

Click here to load this message in the networking platform