Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADO Error: identity cannot be determined ...
Message
De
29/01/2001 14:58:35
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
ADO Error: identity cannot be determined ...
Divers
Thread ID:
00469924
Message ID:
00469924
Vues:
188
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform