Page 1 of 1

manual transaction

Posted: 12.10.2005, 17:06
by Delix
I will work with manual transactions but there is as Problem:

The following code has been executed and all seems ok.


[syntax="delphi"]
TR0: TZIbSqlTransact;

procedure TMain.Button1Click(Sender: TObject);
begin
TR0.AutoCommit:=False;
TR0.StartTransaction;
..
do_anything..
..
TR0.COMMIT;
TR0.AutoCommit:=True;
end;
[/syntax]

If the Databse should be closed, i get this message:

„cannot disconnect database with open transactions ( 1 active)“

what is wrong?

Posted: 13.10.2005, 07:47
by Michael
Hi Delix,

I have no experiences with 5.4.1 but in 6.1.5 these manual transactions are going to work. Just take a look into the examples (Project"Transactions") of our 6.1.5-Tutorial which you may obtain from our download area.

Other question: Did you try this using version 5.5?

Suggestions: If the project is not that big: migrate to 6.1.5. If the project is in planning state: use 6.x.

P.S.: Changed the syntax-highlighting in your post ;-)