ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/branches/udr/client/3.0/FB30Transaction.pas
(Generate patch)

Comparing ibx/trunk/fbintf/client/3.0/FB30Transaction.pas (file contents):
Revision 315 by tony, Thu Feb 25 11:56:36 2021 UTC vs.
Revision 359 by tony, Tue Dec 7 09:37:32 2021 UTC

# Line 49 | Line 49 | type
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;
# Line 98 | Line 99 | begin
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  
# Line 116 | Line 122 | begin
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;
# Line 152 | Line 170 | begin
170         IBDataBaseError;
171    end;
172    SignalActivity;
173 <  FreeHandle;
173 >  FreeHandle(Force);
174   end;
175  
176   procedure TFB30Transaction.CommitRetaining;
# Line 197 | Line 215 | begin
215         IBDataBaseError;
216    end;
217    SignalActivity;
218 <  FreeHandle;
218 >  FreeHandle(Force);
219   end;
220  
221   procedure TFB30Transaction.RollbackRetaining;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines