Subject RE: [IBO] two transactions per one IB_Connection
Author Support List
[This is a message I found that was rejected earlier.]

Gerhard,

The 2nd transaction is for the purpose of maintaining the SchemaCache
information. Perhaps you could use a SchemaCacheDir setting and then it
won't create the additional transaction.

Sorry for my delay in responding to this.

Hope this helps,
Jason LeRoy Wharton


-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
Of Gerhard Knapp
Sent: Tuesday, January 04, 2011 7:03 AM
To: IBObjects@yahoogroups.com
Subject: [IBO] two transactions per one IB_Connection

Hi,
what can i do, that i have only one transaction (that i created self) on one
IB_Connection (created dynamicly in a win32 service) ?

1. create session:

mySession:= TIB_Session.create(nil);
with mySession do begin
AllowDefaultTransaction:= false; //!!!!! a trying but not helped
AllowDefaultConnection:= false; //!!!!! a trying but not helped
end;

2. create transaction:

myTransaction:= TIB_Transaction.create(mySession);
with myTransaction do begin
IB_Session:= mySession;
IB_Connection:= nil;
IB_Connection1:= nil;
IB_Connection2:= nil;
ServerAutoCommit:= false;
AutoCommit:= true;
LockWait:= false;
Isolation:= tiCommitted;
end;

3. create connection:

myConnection:= TIB_Connection.Create(mySession);
with myConnection do begin
IB_Session:= mySession;
myTransaction.IB_Connection:= myConnection;
DefaultTransaction:= myTransaction;
end;

if i test after myConnection.connect the transactioncount, then i have 2
Transactions !!

best regards
Gerhard