Subject Re: [IBO] Transactions and Stored Procedures
Author Christian Danner
On Sat, 4 Feb 2006 05:34:34 +0000 (UTC), I wrote:

>>IB_Temp is a TIB_DSQL, not a TIB_Query.
>>Its IB_Transaction property is set to be IB_Transaction1:
>>
>>var
>> returnval: string;
>> nr: integer;
>>....
>>returnval :=3D '';
>>nr :=3D [ something!! ]
>> with DataModule1.IB_Temp do
>> try
>> if IB_Transaction.InTransaction then
>> IB_Transaction.Commit;
>> SQL.Clear;
>> SQL.Add('execute procedure RS_SETTEMPABSCHLUSS(:Nr)');

> if not IB_Transaction1.Started then
It's not about the physical transaction, so please correct it to:
if not IB_Transaction1.InTransaction then

> IB_Transaction1.StartTransaction;
>> Prepare;
>> ParamByName('Nr').AsInteger :=3D Nr;
>> Execute;
>> returnval :=3D FieldByName('Intern').AsString;
> IB_Transaction1.Commit;
>> except
>> ...
> IB_Transaction1.RollBack;
>> end;

Sorry, one more time too fast with the buttons.

Christian