49 |
|
FTransactionIntf: Firebird.ITransaction; |
50 |
|
FFirebird30ClientAPI: TFB30ClientAPI; |
51 |
|
procedure StartMultiple; |
52 |
< |
procedure FreeHandle; |
52 |
> |
procedure FreeHandle(Force: boolean); |
53 |
|
protected |
54 |
|
function GetActivityIntf(att: IAttachment): IActivityMonitor; override; |
55 |
|
procedure SetInterface(api: TFBClientAPI); override; |
56 |
+ |
function GetTrInfo(ReqBuffer: PByte; ReqBufLen: integer): ITrInformation; override; |
57 |
|
public |
58 |
|
destructor Destroy; override; |
59 |
|
property TransactionIntf: Firebird.ITransaction read FTransactionIntf; |
99 |
|
end; |
100 |
|
end; |
101 |
|
|
102 |
< |
procedure TFB30Transaction.FreeHandle; |
102 |
> |
procedure TFB30Transaction.FreeHandle(Force: boolean); |
103 |
|
begin |
104 |
|
if assigned(FTransactionIntf) then |
105 |
+ |
try |
106 |
|
FTransactionIntf.release; |
107 |
+ |
except |
108 |
+ |
if not Force then raise; |
109 |
+ |
{else ignore if Force = true} |
110 |
+ |
end; |
111 |
|
FTransactionIntf := nil; |
112 |
|
end; |
113 |
|
|
122 |
|
FFirebird30ClientAPI := api as TFB30ClientAPI; |
123 |
|
end; |
124 |
|
|
125 |
+ |
function TFB30Transaction.GetTrInfo(ReqBuffer: PByte; ReqBufLen: integer |
126 |
+ |
): ITrInformation; |
127 |
+ |
begin |
128 |
+ |
Result := TTrInformation.Create(FFirebird30ClientAPI); |
129 |
+ |
with FFirebird30ClientAPI, Result as TTrInformation do |
130 |
+ |
begin |
131 |
+ |
FTransactionIntf.getInfo(StatusIntf, ReqBufLen, BytePtr(ReqBuffer), |
132 |
+ |
getBufSize, BytePtr(Buffer)); |
133 |
+ |
Check4DataBaseError; |
134 |
+ |
end |
135 |
+ |
end; |
136 |
+ |
|
137 |
|
destructor TFB30Transaction.Destroy; |
138 |
|
begin |
139 |
|
inherited Destroy; |
140 |
< |
FreeHandle; |
140 |
> |
FreeHandle(true); |
141 |
|
end; |
142 |
|
|
143 |
|
function TFB30Transaction.GetInTransaction: boolean; |
170 |
|
IBDataBaseError; |
171 |
|
end; |
172 |
|
SignalActivity; |
173 |
< |
FreeHandle; |
173 |
> |
FreeHandle(Force); |
174 |
|
end; |
175 |
|
|
176 |
|
procedure TFB30Transaction.CommitRetaining; |
215 |
|
IBDataBaseError; |
216 |
|
end; |
217 |
|
SignalActivity; |
218 |
< |
FreeHandle; |
218 |
> |
FreeHandle(Force); |
219 |
|
end; |
220 |
|
|
221 |
|
procedure TFB30Transaction.RollbackRetaining; |