Firebird Blob

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
abed
Posts: 15
Joined: Mon 27 Apr 2009 16:39

Firebird Blob

Post by abed » Thu 16 Oct 2014 10:05

Hello,
I set deferredBlobRead as True with a huge table imagines to accelerate the fetches,
Every things goes ok, until I did TuniQuery.last.
I’ve got an error from the TIBCBlob.AllocBlob.
Any help

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Firebird Blob

Post by ViktorV » Thu 16 Oct 2014 11:32

Unfortunately, we could not reproduce the issue.
Please specify the full error message you are getting.

abed
Posts: 15
Joined: Mon 27 Apr 2009 16:39

Re: Firebird Blob

Post by abed » Thu 16 Oct 2014 13:12

I hope that's help [img]Unierr.jpg[/img]

abed
Posts: 15
Joined: Mon 27 Apr 2009 16:39

Re: Firebird Blob

Post by abed » Thu 16 Oct 2014 13:14

Scuse me, how to attach an image?

abed
Posts: 15
Joined: Mon 27 Apr 2009 16:39

Re: Firebird Blob

Post by abed » Thu 16 Oct 2014 14:27

Hello,
in this piece of code i create manually what tcxDBImage does and how
exception generated


procedure TfrmDip.dsDipDataChange(Sender: TObject; Field: TField);
var
Stream: TMemoryStream;

begin
//tbDip_DIP it's a TuniQuery
//SpecificOptions.Values['InterBase.DeferredBlobRead'] :='True';
//SpecificOptions.Values['CacheBlobs'] :='False';
//PHOTO IS BlobField in Firebird table

with tbDip_DIP do
begin
if Not FieldByName('PHOTO').IsNull then
begin
Stream := TMemoryStream.Create;
stream := TmemoryStream(CreateBlobStream(FieldByName('PHOTO'),bmRead));
try
stream.Size := TBlobField(FieldByName('PHOTO')).BlobSize;
except
//just when EOF
end;
stream.Position := 0;
cxImage1.Picture.Bitmap.LoadFromStream(Stream);
end;
end;
end;

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Firebird Blob

Post by ViktorV » Fri 17 Oct 2014 08:04

Since your DeferredBlobRead property is set to True, then Blob fields are fetched on demand. But when calling TUniQuery.Last, calls to all the records and fetch of Blob fields occur in the loop. This is most likely the reason for the error you get.
Take a look at the SmartFetch option, that we have implemented in the latest UniDAC version (http://www.devart.com/unidac/docs/devar ... ptions.htm).
It can be useful when navigating through large recordsets.

abed
Posts: 15
Joined: Mon 27 Apr 2009 16:39

Re: Firebird Blob

Post by abed » Fri 17 Oct 2014 16:15

No, i've got other worse problems,
i've worked arround differently
i hope that next update w'll be solved.
N.B.
(i create readonly transaction on the fly).

abed
Posts: 15
Joined: Mon 27 Apr 2009 16:39

Re: Firebird Blob

Post by abed » Fri 17 Oct 2014 16:17

correction
the transction was created on the fly and it's readonly,
and i think that in this way, it's part of the problem.
thanks

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Firebird Blob

Post by ViktorV » Mon 20 Oct 2014 08:58

Unfortunately, we couldn't reproduce the problem in the described way. In addition, you are using third-party components (e.g., TcxDBImage). Try to reproduce the problem having replaced the third-party components by the standard ones, and if the error is reproduced correctly, please send a small sample to viktorv*devart*com to demonstrate the issue, including a script to create database objects.

abed
Posts: 15
Joined: Mon 27 Apr 2009 16:39

Re: Firebird Blob

Post by abed » Wed 22 Oct 2014 08:37

I've got the same error with Std delphi controls.
for the moment no problem, i've workedarround.
when i've some time, i'll prepare for u a separate piece of code to reproduce it.
thanks

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: Firebird Blob

Post by ViktorV » Wed 22 Oct 2014 09:17

Feel free to contact us if you have any further questions.

Post Reply