Subject | Re: [IBO] Create TIB_Transaction and TIB_StoredProc with code ... |
---|---|
Author | jwharton@ibobjects.com |
Post date | 2004-04-02T14:55:15Z |
Looks good to me. I would use the TIB_DSQL component if you are providing the raw SQL statement you plan to use.
Nothing says you have to use a TIB_StoredProc component just because you are using a stored procedure. That's just if
you want to plug in the name of the stored procedure only and have IBO put the SQL statement together for you.
Jason Wharton
www.ibobjects.com
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
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
Nothing says you have to use a TIB_StoredProc component just because you are using a stored procedure. That's just if
you want to plug in the name of the stored procedure only and have IBO put the SQL statement together for you.
Jason Wharton
www.ibobjects.com
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
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