Firebird Blob
Firebird Blob
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
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
Re: Firebird Blob
Unfortunately, we could not reproduce the issue.
Please specify the full error message you are getting.
Please specify the full error message you are getting.
Re: Firebird Blob
I hope that's help [img]Unierr.jpg[/img]
Re: Firebird Blob
Scuse me, how to attach an image?
Re: Firebird Blob
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;
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;
Re: Firebird Blob
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.
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.
Re: Firebird Blob
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).
i've worked arround differently
i hope that next update w'll be solved.
N.B.
(i create readonly transaction on the fly).
Re: Firebird Blob
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
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
Re: Firebird Blob
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.
Re: Firebird Blob
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
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
Re: Firebird Blob
Feel free to contact us if you have any further questions.