60 |
|
procedure InternalRollback(Force: boolean); override; |
61 |
|
procedure InternalRollbackRetaining; override; |
62 |
|
public |
63 |
+ |
constructor Create(api: TFBClientAPI; Attachment: IAttachment; aTransactionIntf: Firebird.ITransaction); overload; |
64 |
|
destructor Destroy; override; |
65 |
|
property TransactionIntf: Firebird.ITransaction read FTransactionIntf; |
66 |
|
{ITransaction} |
112 |
|
|
113 |
|
procedure TFB30Transaction.InternalStartSingle(attachment: IAttachment); |
114 |
|
begin |
115 |
+ |
if FTransactionIntf = nil then |
116 |
|
with FFirebird30ClientAPI do |
117 |
|
begin |
118 |
|
FTransactionIntf := (attachment as TFB30Attachment).AttachmentIntf.startTransaction(StatusIntf, |
119 |
|
(FTPB as TTPB).getDataLength,BytePtr((FTPB as TTPB).getBuffer)); |
120 |
|
Check4DataBaseError; |
121 |
+ |
FTransactionIntf.addRef(); |
122 |
|
end; |
123 |
|
SignalActivity; |
124 |
|
end; |
128 |
|
DtcStart: IDtcStart; |
129 |
|
i: integer; |
130 |
|
begin |
131 |
+ |
if FTransactionIntf = nil then |
132 |
|
with FFirebird30ClientAPI do |
133 |
|
begin |
134 |
|
Dtc := MasterIntf.getDtc; |
147 |
|
|
148 |
|
FTransactionIntf := DtcStart.start(StatusIntf); |
149 |
|
Check4DataBaseError; |
150 |
+ |
FTransactionIntf.addRef(); |
151 |
|
SignalActivity; |
152 |
|
end; |
153 |
|
end; |
196 |
|
SignalActivity; |
197 |
|
end; |
198 |
|
|
199 |
+ |
constructor TFB30Transaction.Create(api: TFBClientAPI; Attachment: IAttachment; |
200 |
+ |
aTransactionIntf: Firebird.ITransaction); |
201 |
+ |
begin |
202 |
+ |
FTransactionIntf := aTransactionIntf; |
203 |
+ |
FTransactionIntf.addRef(); |
204 |
+ |
FForeignHandle := true; |
205 |
+ |
inherited Create(api,Attachment,nil,taCommit,''); |
206 |
+ |
end; |
207 |
+ |
|
208 |
|
destructor TFB30Transaction.Destroy; |
209 |
|
begin |
210 |
|
inherited Destroy; |