Board index » delphi » ADO Update ERROR : Row does not exists

ADO Update ERROR : Row does not exists

Hi
When I update AOQuery it smotime error
MSG: Row does not Exists the data has been changed last read
why?
thak for your reply
 

Re:ADO Update ERROR : Row does not exists


"wesley" <lanser...@pchome.com.tw> ???g??l news:...

Quote
> Hi
> When I update AOQuery it smotime error
> MSG: Row does not Exists the data has been changed last read
> why?
> thak for your reply

Re:ADO Update ERROR : Row does not exists


This may be because you dont have a unique key on the records.

Re:ADO Update ERROR : Row does not exists


Quote
>When I update AOQuery it smotime error
>MSG: Row does not Exists the data has been changed last read
>why?

Do you have a unique key on this table?  if it does not create one

Does the table  have any default values that are set in the database?
If so you may have to change the "Update Criteria" property of the Recordset.
by default the record is located in the database using all the field values in
the original record.  This can create a problem when your dataset set default
values which change the record in the database but not in the record on the
client.

ADODataSet1.Properties['Update Criteria'].value :=adCriteriaKey; //use only
columns in the primary key

ADODataSet1.Properties['Update Criteria'].value :=adCriteriaUpdCols //use only
columns that where modified

Update Criteria must be set after the Recordset is open.  It is best to set it
in the beforeupdate and beforedelete events because it will reset to the default
after a requery.

--
Brian Bushay (TeamB)
Bbus...@NMPLS.com

Re:ADO Update ERROR : Row does not exists


You might get the error if you do a 'Commit' without clearing parameters.

I hope that it helps,

I.Nemlich

Quote
"wesley" <lanser...@pchome.com.tw> wrote in message

news:3da921d1@newsgroups.borland.com...
Quote
> Hi
> When I update AOQuery it smotime error
> MSG: Row does not Exists the data has been changed last read
> why?
> thak for your reply

Other Threads