ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/fbintf/client/2.5/FB25Transaction.pas
(Generate patch)

Comparing ibx/trunk/fbintf/client/2.5/FB25Transaction.pas (file contents):
Revision 56 by tony, Mon Mar 6 10:20:02 2017 UTC vs.
Revision 263 by tony, Thu Dec 6 15:55:01 2018 UTC

# Line 82 | Line 82 | type
82    TFB25Transaction = class(TFBTransaction,ITransaction, IActivityMonitor)
83    private
84      FHandle: TISC_TR_HANDLE;
85 +    FFirebird25ClientAPI: TFB25ClientAPI;
86    protected
87      function GetActivityIntf(att: IAttachment): IActivityMonitor; override;
88 +    procedure SetInterface(api: TFBClientAPI); override;
89    public
90      property Handle: TISC_TR_HANDLE read FHandle;
91  
# Line 109 | Line 111 | begin
111    Result := (att as TFB25Attachment);
112   end;
113  
114 + procedure TFB25Transaction.SetInterface(api: TFBClientAPI);
115 + begin
116 +  inherited SetInterface(api);
117 +  FFirebird25ClientAPI := api as TFB25ClientAPI;
118 +  OnDatabaseError := FFirebird25ClientAPI.IBDataBaseError;
119 + end;
120 +
121   function TFB25Transaction.GetInTransaction: boolean;
122   begin
123    Result := FHandle <> nil;
# Line 120 | Line 129 | begin
129      IBError(ibxeNotAMultiDatabaseTransaction,[nil]);
130    if FHandle = nil then
131      Exit;
132 <  with Firebird25ClientAPI do
132 >  with FFirebird25ClientAPI do
133      Call(isc_prepare_transaction(StatusVector, @FHandle));
134   end;
135  
# Line 128 | Line 137 | procedure TFB25Transaction.Commit(Force:
137   begin
138    if FHandle = nil then
139      Exit;
140 <  with Firebird25ClientAPI do
140 >  with FFirebird25ClientAPI do
141      Call(isc_commit_transaction(StatusVector, @FHandle),not Force);
142    FHandle := nil;
143   end;
# Line 137 | Line 146 | procedure TFB25Transaction.CommitRetaini
146   begin
147    if FHandle = nil then
148      Exit;
149 <  with Firebird25ClientAPI do
149 >  with FFirebird25ClientAPI do
150      Call(isc_commit_retaining(StatusVector, @FHandle));
151   end;
152  
# Line 150 | Line 159 | begin
159      Exit;
160    pteb := nil;
161    FDefaultCompletion := DefaultCompletion;
162 <  with Firebird25ClientAPI do
162 >  with FFirebird25ClientAPI do
163    if (Length(FAttachments) = 1)  then
164    try
165      db_handle := (FAttachments[0] as TFB25Attachment).Handle;
# Line 189 | Line 198 | procedure TFB25Transaction.Rollback(Forc
198   begin
199    if FHandle = nil then
200      Exit;
201 <  with Firebird25ClientAPI do
201 >  with FFirebird25ClientAPI do
202      Call(isc_rollback_transaction(StatusVector, @FHandle),not Force);
203    FHandle := nil;
204   end;
# Line 198 | Line 207 | procedure TFB25Transaction.RollbackRetai
207   begin
208    if FHandle = nil then
209      Exit;
210 <  with Firebird25ClientAPI do
210 >  with FFirebird25ClientAPI do
211      Call(isc_rollback_retaining(StatusVector, @FHandle));
212   end;
213  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines