record not found

juna

Member²
I get this error message when trying to edit or delete a record:"Record not found or changed by another user".
Can you please help?
THNX
 
Can you set TOracleDataSet.Debug to True to verify which statement is executed that leads to this "Record not found or changed by another user" conclusion by the TClientDataSet?
 
datamodule1.ClientDataSet_equip.Close;
/* it gets the id of the equipment to be deleted*/
equipment_id:= DataModule1.ClientDataSet_equip_all.Fields.FieldByName('Equipment_id').Value;

DataModule1.ClientDataSet_equip.CommandText :=('select a.* from equipment a,equipment_category b, equipment_status c, manufacturer d, equipment_type e');
DataModule1.ClientDataSet_equip.CommandText := DataModule1.ClientDataSet_equip.CommandText + (' where a.equipment_category_id = b.equipment_category_id and a.status_id =c.status_id and a.manufacturer_id =d.manufacturer_id and a.equipment_type_id = e.equipment_type_id and a.equipment_id =:equip_id');
DataModule1.ClientDataSet_equip.Params[0].Value := equipment_id;

datamodule1.ClientDataSet_equip.Open;
datamodule1.ClientDataSet_equip.Delete;
datamodule1.ClientDataSet_equip.ApplyUpdates(-1);
 
Also this error does not occur every time I do a delete or edit.Maybe this wil help find the problem
 
Back
Top