Subject | Re: [IBO] Transactions and Stored Procedures |
---|---|
Author | Christian Danner |
Post date | 2006-02-04T05:34:33Z |
On Sat, 4 Feb 2006 05:34:34 +0000 (UTC), I wrote:
if not IB_Transaction1.InTransaction then
Christian
>>IB_Temp is a TIB_DSQL, not a TIB_Query.It's not about the physical transaction, so please correct it to:
>>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
if not IB_Transaction1.InTransaction then
> IB_Transaction1.StartTransaction;Sorry, one more time too fast with the buttons.
>> Prepare;
>> ParamByName('Nr').AsInteger :=3D Nr;
>> Execute;
>> returnval :=3D FieldByName('Intern').AsString;
> IB_Transaction1.Commit;
>> except
>> ...
> IB_Transaction1.RollBack;
>> end;
Christian