Subject Re: Create TIB_Transaction and TIB_StoredProc with code ...
Author tractaylor
I am not really sure what the problem is, but I think you need to add
the connection to the IB_Transaction like this :

FTransaction.AddConnection(Connection);

instead of

FTransaction.IB_Connection := Connection;

But again, are you getting errors or something? If so, what are they?


Hope this helps.

Trac


--- In IBObjects@yahoogroups.com, "dchri2000" <dchri@i...> wrote:
> Hi all,
>
> how do i create a TIB_Transaction and TIB_StoredProc, with code,
> assign the TIB_Transaction to TIB_StoredProc and a design-time
> TIB_Connection to TIB_Transaction ?
>
> I thought that it was somethink like this :
>
> <snip>
>
> constructor TSerialConnection.Create(AOwner: TComponent; CommName:
> ShortString;
> Connection: TIB_Connection);
> begin
> FBeepsCount := 0;
>
> FSerialPort := TSerialPortNG.Create(AOwner);
> FSerialPort.OnRxClusterEvent := DoRXClusterEvent;
> FSerialPort.FlowControl := 1;
> FSerialPort.CommPort := CommName;
>
> FTransaction := TIB_Transaction. Create(AOwner);
> FTransaction.IB_Connection := Connection;
> FTransaction.Isolation := tiCommitted;
> FTransaction.LockWait := True;
>
> FStoredProcedure := TIB_StoredProc.Create(AOwner);
> FStoredProcedure.IB_Transaction := FTransaction;
> FStoredProcedure.IB_Connection := Connection;
> FStoredProcedure.SQL.Add('EXECUTE PROCEDURE EMPLOYEE_ENTRY ?
> EMP_BARC');
>
> FTimer := TTimer.Create(AOwner);
> FTimer.Enabled := False;
> FTimer.Interval := 250;
> FTimer.OnTimer := DoTimer;
> end;
>
> < snip >
>
>
> Any hint ?
>
> Dimitris