Subject Questions about Using IB_Transaction
Author Joel Gauvreau
Hi,
I want to execute many different SQL statement within the same
Transaction and be able to rollback everything or commit everything..
The First Statements works fine, but the second I get an Error "Invalid
Transaction Handle (expecting explicit Transaction start)".
Is it wrong to use the same transaction for to separate connection to the
same database?
Is there some other way to achieve this?

example :
Var
Con1 : TIB_Connection;
Con2 : TIB_Connection;
Dts1 : TIB_Dataset;
Dts2 : TIB_Dataset;
Tr1 : TIB_Transaction;`
begin
...
Dts1.Ib_Connection := Con1;
dts1.Ib_Transaction := Tr1;
Dts1.SQL.Text := 'select * from table1';
Dts1.Open;
Showmessage(Dts1.FieldByname('Field1').asString);
Dts1.close;

dts2.ib_Connection := Con2;
Dts2.ib_Transaction := Tr1;
Dts2.Sql.text := 'update Table1 set field1="123abc";';
Dts2.Open; <-- I get the error here.
Dts2.Close;

Tr1.Commit;
end;

Any help would be greatly appreciated!
Thanks

Joël Gauvreau.
Programmer - UQAT


[Non-text portions of this message have been removed]