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

Comparing ibx/trunk/fbintf/client/3.0/FB30Blob.pas (file contents):
Revision 262 by tony, Thu Jan 18 14:37:48 2018 UTC vs.
Revision 263 by tony, Thu Dec 6 15:55:01 2018 UTC

# Line 67 | Line 67 | type
67    private
68      FBlobIntf: Firebird.IBlob;
69      FEOB: boolean;
70 +    FFirebird30ClientAPI: TFB30ClientAPI;
71    protected
72      procedure CheckReadable; override;
73      procedure CheckWritable; override;
# Line 191 | Line 192 | begin
192    if FBlobIntf = nil then
193      IBError(ibxeBlobNotOpen,[nil]);
194  
195 <  with Firebird30ClientAPI, Response as TBlobInfo do
195 >  with FFirebird30ClientAPI, Response as TBlobInfo do
196    begin
197      FBlobIntf.getInfo(StatusIntf,Length(Request),BytePtr(@Request),
198                                                 GetBufSize, BytePtr(Buffer));
# Line 204 | Line 205 | procedure TFB30Blob.InternalClose(Force:
205   begin
206    if FBlobIntf = nil then
207      Exit;
208 <  with Firebird30ClientAPI do
208 >  with FFirebird30ClientAPI do
209    begin
210      FBlobIntf.close(StatusIntf);
211      if not Force then Check4DataBaseError;
# Line 217 | Line 218 | procedure TFB30Blob.InternalCancel(Force
218   begin
219    if FBlobIntf = nil then
220      Exit;
221 <  with Firebird30ClientAPI do
221 >  with FFirebird30ClientAPI do
222    begin
223      FBlobIntf.cancel(StatusIntf);
224      if not Force then Check4DataBaseError;
# Line 230 | Line 231 | constructor TFB30Blob.Create(Attachment:
231    MetaData: IBlobMetaData; BPB: IBPB);
232   begin
233      inherited Create(Attachment,Transaction,MetaData,BPB);
234 <    with Firebird30ClientAPI do
234 >    FFirebird30ClientAPI := Attachment.Firebird30ClientAPI;
235 >    with FFirebird30ClientAPI do
236      begin
237        if BPB = nil then
238          FBlobIntf := Attachment.AttachmentIntf.createBlob(StatusIntf,Transaction.TransactionIntf,
# Line 252 | Line 254 | begin
254    MetaData.FCharSetID := CharSetID;
255    MetaData.FHasFullMetaData := true;
256    inherited Create(Attachment,Transaction,MetaData,BPB);
257 <  with Firebird30ClientAPI do
257 >  FFirebird30ClientAPI := Attachment.Firebird30ClientAPI;
258 >  with FFirebird30ClientAPI do
259    begin
260      if BPB = nil then
261        FBlobIntf := Attachment.AttachmentIntf.createBlob(StatusIntf,Transaction.TransactionIntf,
# Line 269 | Line 272 | constructor TFB30Blob.Create(Attachment:
272    Transaction: TFBTransaction; MetaData: IBlobMetaData; BlobID: TISC_QUAD; BPB: IBPB);
273   begin
274    inherited Create(Attachment,Transaction,MetaData,BlobID,BPB);
275 +  FFirebird30ClientAPI := Attachment.Firebird30ClientAPI;
276    if (BlobID.gds_quad_high = 0) and (BlobID.gds_quad_low = 0) then
277      Exit;
278  
279 <  with Firebird30ClientAPI do
279 >  with FFirebird30ClientAPI do
280    begin
281      if BPB = nil then
282        FBlobIntf := Attachment.AttachmentIntf.openBlob(StatusIntf,(Transaction as TFB30Transaction).TransactionIntf,
# Line 300 | Line 304 | begin
304    LocalBuffer := PAnsiChar(@Buffer);
305    repeat
306      localCount := Min(Count,MaxuShort);
307 <    with Firebird30ClientAPI do
307 >    with FFirebird30ClientAPI do
308        returnCode := FBlobIntf.getSegment(StatusIntf,localCount, LocalBuffer, @BytesRead);
309      SignalActivity;
310      Inc(LocalBuffer,BytesRead);
# Line 313 | Line 317 | begin
317    if (returnCode <> Firebird.IStatus.Result_OK) and
318       (returnCode <> Firebird.IStatus.Result_SEGMENT) and
319       (returnCode <> Firebird.IStatus.RESULT_NO_DATA) then
320 <    Firebird30ClientAPI.IBDataBaseError
320 >    FFirebird30ClientAPI.IBDataBaseError
321   end;
322  
323   function TFB30Blob.Write(const Buffer; Count: Longint): Longint;
# Line 328 | Line 332 | begin
332    LocalBuffer := PAnsiChar(@Buffer);
333    repeat
334      localCount := Min(Count,MaxuShort);
335 <    with Firebird30ClientAPI do
335 >    with FFirebird30ClientAPI do
336      begin
337        FBlobIntf.putSegment(StatusIntf,localCount,LocalBuffer);
338        Check4DataBaseError;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines