Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ODBC - Update on Linked table 'xyz' failed?

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
Hi,

Any idea why I cannot issue an update on a recordset that is currently in EditMode = 1 ?

I retrieve the record with
Code:
dbOpenDynaset, dbSeeChanges, dbPessimistic

I issue the Edit command and it puts the record in edit mode, I change values of the recordset fields, but when 'update' is issued it errors with
ODBC - Update on Linked table 'xyz' failed?

Any ideas why?

Thanks,
1DMF

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Dance Music Downloads
 
OK, worked it out!

I had a loop which collected the data from an unbound form and then updated each field in the recordset.

One of the fields was also the table primary key and although it was replacing this value with the value it was to start with, I can only assume that this causes an issue as it must see this as an alteration to the primary key even though the value itself hasn't changed.

As soon as I removed this field from the loop, the update worked fine!

Thanks,
1DMF

"In complete darkness we are all the same, it is only our knowledge and wisdom that separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!"

Free Dance Music Downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top