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

Comparing ibx/trunk/fbintf/client/3.0/FB30Transaction.pas (file contents):
Revision 262 by tony, Fri Apr 28 07:35:12 2017 UTC vs.
Revision 263 by tony, Thu Dec 6 15:55:01 2018 UTC

# Line 47 | Line 47 | type
47    TFB30Transaction = class(TFBTransaction,ITransaction, IActivityMonitor)
48    private
49      FTransactionIntf: Firebird.ITransaction;
50 +    FFirebird30ClientAPI: TFB30ClientAPI;
51      procedure StartMultiple;
52      procedure FreeHandle;
53    protected
54      function GetActivityIntf(att: IAttachment): IActivityMonitor; override;
55 +    procedure SetInterface(api: TFBClientAPI); override;
56    public
57      destructor Destroy; override;
58      property TransactionIntf: Firebird.ITransaction read FTransactionIntf;
# Line 76 | Line 78 | var Dtc: IDtc;
78      DtcStart: IDtcStart;
79      i: integer;
80   begin
81 <  with Firebird30ClientAPI do
81 >  with FFirebird30ClientAPI do
82    begin
83      Dtc := MasterIntf.getDtc;
84      DtcStart := Dtc.startBuilder(StatusIntf);
# Line 108 | Line 110 | begin
110    Result := att as TFB30Attachment;
111   end;
112  
113 + procedure TFB30Transaction.SetInterface(api: TFBClientAPI);
114 + begin
115 +  inherited SetInterface(api);
116 +  FFirebird30ClientAPI := api as TFB30ClientAPI;
117 + end;
118 +
119   destructor TFB30Transaction.Destroy;
120   begin
121    inherited Destroy;
# Line 125 | Line 133 | begin
133      IBError(ibxeNotAMultiDatabaseTransaction,[nil]);
134    if FTransactionIntf = nil then
135      Exit;
136 <  with Firebird30ClientAPI do
136 >  with FFirebird30ClientAPI do
137    begin
138      FTransactionIntf.prepare(StatusIntf,0,nil);
139      Check4DataBaseError;
# Line 137 | Line 145 | procedure TFB30Transaction.Commit(Force:
145   begin
146    if FTransactionIntf = nil then
147      Exit;
148 <  with Firebird30ClientAPI do
148 >  with FFirebird30ClientAPI do
149    begin
150      FTransactionIntf.commit(StatusIntf);
151      if not Force and InErrorState then
# Line 151 | Line 159 | procedure TFB30Transaction.CommitRetaini
159   begin
160    if FTransactionIntf = nil then
161      Exit;
162 <  with Firebird30ClientAPI do
162 >  with FFirebird30ClientAPI do
163    begin
164      FTransactionIntf.commitRetaining(StatusIntf);
165      Check4DataBaseError;
# Line 163 | Line 171 | procedure TFB30Transaction.Start(Default
171   begin
172    if FTransactionIntf <> nil then
173      Exit;
166
174    FDefaultCompletion := DefaultCompletion;
175  
176    if Length(FAttachments) = 1 then
177 <    with Firebird30ClientAPI do
177 >    with FFirebird30ClientAPI do
178      begin
179        FTransactionIntf  := (FAttachments[0] as TFB30Attachment).AttachmentIntf.startTransaction(StatusIntf,
180                 (FTPB as TTPB).getDataLength,BytePtr((FTPB as TTPB).getBuffer));
# Line 183 | Line 190 | procedure TFB30Transaction.Rollback(Forc
190   begin
191    if FTransactionIntf = nil then
192      Exit;
193 <  with Firebird30ClientAPI do
193 >  with FFirebird30ClientAPI do
194    begin
195      FTransactionIntf.rollback(StatusIntf);
196      if not Force and InErrorState then
# Line 197 | Line 204 | procedure TFB30Transaction.RollbackRetai
204   begin
205    if FTransactionIntf = nil then
206      Exit;
207 <  with Firebird30ClientAPI do
207 >  with FFirebird30ClientAPI do
208    begin
209      FTransactionIntf.rollbackRetaining(StatusIntf);
210      Check4DataBaseError;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines