0

Database and the components,query & table are from Accuracer.

I am using a simple delete query :

procedure TMain_Form.Button1Click(Sender: TObject);
begin
DATA_MODULE.QUERY.Close;
DATA_MODULE.QUERY.SQL.Clear;
//DATA_MODULE.QUERY.SQL.Add('START TRANSACTION;');
DATA_MODULE.QUERY.SQL.Add('delete from TABLE where DONE = TRUE');

try
//DATA_MODULE.QUERY.SQL.Add('COMMIT;');
DATA_MODULE.QUERY.ExecSQL;
DATA_MODULE.TABLE.Refresh;
except
//DATA_MODULE.QUERY.SQL.Text := 'ROLLBACK';
//DATA_MODULE.QUERY.ExecSQL;
DATA_MODULE.TABLE.Cancel;
end;
end;

If I leave the query as it is above, it works. As soon as I uncomment the lines, it does not. It just deletes records from my grid but the data in the database is intact.

Am I messing up something here ?

user763539
  • 3,509
  • 6
  • 44
  • 103
  • Is that a in-memory table ? Asking because [`they say`](http://www.accuracer.com/products/acr/guide_bde_alternative_client-server_single-file_embedded_bde_replacement_database_delphi_c++builder_kylix/transactions.php) that *Accuracer supports transactions only for disk databases*. – TLama Jun 25 '15 at 07:55
  • no,this is a disk database. – user763539 Jun 25 '15 at 09:13
  • inMemory property of the query is also set to false... – user763539 Jun 25 '15 at 09:19
  • I would have asked AidAim support but that is virtually non existent since I have various tickets that are more than a year old with not a comment in them. Documentation sucks and to get some help on the web is almost impossible. – user763539 Jun 25 '15 at 11:41

2 Answers2

0

It seems, according to the documentation found here (Multi-User and Multi-Thread, Locking Mechanism and Transactions) : http://www.aidaim.com/products/acr/guide_bde_alternative_client-server_single-file_embedded_bde_replacement_database_delphi_c++builder_kylix/index.php

that "- Emptying, Restructuring, Deleting and Renaming tables involved in the transaction " are operations that are incompatible with transactions.

If I am wrong, correct me.

user763539
  • 3,509
  • 6
  • 44
  • 103
0

It occurs to me that the statement before COMMIT; has no semicolon. I.e. a simple Syntax Terror