Subject Re: Get BlobField > 1MB
Author superkatchina
I have found the solution by myself:

meinVTDataModule.Query1.Close;
meinVTDataModule.Query1.SQL.Clear();
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
meinVTDataModule.Query1.RequestLive := TRUE;
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
meinVTDataModule.Query1.SQL.Add('select ZIP_BLOB from
LZA_VERSION where VERS_ID = ' + vers_id);
//meinVTDataModule.Query1.Filter := 'VERS_ID = ' + vers_id;
meinVTDataModule.Query1.Filtered := FALSE;
meinVTDataModule.Query1.Prepare;
meinVTDataModule.Query1.Open;

if(meinVTDataModule.Query1.Eof = FALSE) then
begin
fileStream := TFileStream.Create(name + '.zip', fmCreate);

TBlobField(meinVTDataModule.Query1.FieldByName('ZIP_BLOB')).SaveToStream(fileStream);
end;

meinVTDataModule.Query1.Close();
fileStream.Free();


--- In firebird-support@yahoogroups.com, "superkatchina"
<superomega@t...> wrote:
>
> Hallo
>
> Writing of a TBlobField is ok, but now I have the problem, that the
> data out of the blob is truncated if the size is > 1MB.
>
> I tried this:
>
> // truncates data after 1M ***
> TBlobField(Query.FieldByName('ZIP_BLOB')).SaveToFile(name + '.zip');
> + and +
> fileStream := TFileStream.Create(name + '.zip', fmCreate);
> TBlobField(Query.FieldByName('ZIP_BLOB')).SaveToStream(fileStream);
> ///
>
> the 'Blob Size' and 'Blobs to cache' stands on 4000
>
> How can I fetch a file < 1MB?
>
> Thank you,
> Werner Hofmann