Subject | two transactions per one IB_Connection |
---|---|
Author | Gerhard Knapp |
Post date | 2011-01-04T14:02:59Z |
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
[Non-text portions of this message have been removed]
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
[Non-text portions of this message have been removed]