Subject Re: [IBO] Transactions and Stored Procedures
Author Christian Danner
Hello Helen,

I take the liberty to complete the transaction handling. Hope Your
Honour only forgot to do so - and it isn't me who missed something ;-)

On Fri, 3 Feb 2006 23:47:32 +0000 (UTC), you 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
IB_Transaction1.StartTransaction;
> Prepare;
> ParamByName('Nr').AsInteger :=3D Nr;
> Execute;
> returnval :=3D FieldByName('Intern').AsString;
IB_Transaction1.Commit;
> except
> ...
IB_Transaction1.RollBack;
> end;

Yours truly

Christian