when I try to execute a delete statement on an IB table I always get the following exception: EIBClientError "Update Failed".
the delete seems to work ok (the records are deleted) and using try except, all works allright in the compiled program. Still this is an error and I would like to know if there's any way to eliminate it. I use the following code when deleting:
PS: all delete queries work ok when tried in SQL Explorer...
any help is appreciated.
the delete seems to work ok (the records are deleted) and using try except, all works allright in the compiled program. Still this is an error and I would like to know if there's any way to eliminate it. I use the following code when deleting:
Code:
// if a transaction is in progress, then commit and start a new one
if form1.IBTransaction1.InTransaction then
form1.IBTransaction1.Commit;
form1.IBTransaction1.StartTransaction;
form1.IBUpdateSQL1.DeleteSQL.Clear;
// no matter how simple the statement
form1.IBUpdateSQL1.DeleteSQL.Add('delete from customers where year="' + intTostr(form1.workingYear) + '";');
try form1.IBUpdateSQL1.Apply(ukDelete);
// on exception i do nothing
except end;
form1.IBTransaction1.Commit;
PS: all delete queries work ok when tried in SQL Explorer...
any help is appreciated.