Row cannot be located for updating
From: Alverio (alverio.m_at_tiscali.it)
Date: 09/15/04
- Next message: souris: "Re: ADO MS Access"
- Previous message: Brian Bushay TeamB: "Re: EInvalidGraphic error"
- Next in thread: Brian Bushay TeamB: "Re: Row cannot be located for updating"
- Reply: Brian Bushay TeamB: "Re: Row cannot be located for updating"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 15 Sep 2004 21:08:43 +0200
I can see that this is a problem for many people.
I use Delphi 6, Access 97 database and ADO.
I have just installed Jet 4.0 SP 8, without solving my problem both with
Windows 98 and Windows 2000.
I have a master table and a detail table. Relationship is between field ID
(autoincrement field and primary key in MasterTable) and IDMaster (numeric
field in DetailTable). DetailTable has an autoincrement field as primary
key. The relationship is created in Access as well. I'm using
ADODatasets.CursorLocation is clUseClient and CursorType is ctStatic
Anytime I add a new record in DetailTable I can see that IDMaster is filled
with the proper value from MasterTable: When I post the record its primary
key is 0.
First case.
If I refresh, I get the error message "Key value for this row was changed
or deleted at the data store. The local row is now deleted" and actually the
row seems to disappear. But If a close the debugger and re-launch it the row
is there, with the proper ID value!
Second case.
If I delete or change the record I get the message "Row cannot be located
for updating. Some values may have been changed since it was last read".
Close and re-launch the debugger and the row is there, with the proper ID
value.
I've set ADODataSet.Properties['Update Criteria'].value to adCriteriaKey in
the BeforeRefresh and BeforeDelete methods of both Datasets without
result.I've tried also setting different values.
And I've also set the AutoGenerateValue property of ID in DetailTable to
arAutoInc.
Even worse! I've just discovered that even the primary key of MasterTable
doesn't generate auomatically!
I really don't understand how coming out from this nightmare. Back to BDE?
Thanks a lot.
- Next message: souris: "Re: ADO MS Access"
- Previous message: Brian Bushay TeamB: "Re: EInvalidGraphic error"
- Next in thread: Brian Bushay TeamB: "Re: Row cannot be located for updating"
- Reply: Brian Bushay TeamB: "Re: Row cannot be located for updating"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|