Subject Re: [IBO] BlobStream
Author Dmitry Beloshistov
----- Original Message -----
From: <elliot_ib@...>
To: <IBObjects@yahoogroups.com>
Sent: Thursday, August 09, 2001 5:27 PM
Subject: [IBO] BlobStream


> Hello,
> I'm using Delphi5 with Interbase5 and have the following Problem.
> I want to use BlobStream to insert Blobdata to the Database but the
> compiler shows me the error message: incompatible
> types: 'TIBBlobStream' and 'TStream' for the following source code:
> BlobStream:=
> KaDatabase.KaData.TAB_Kanew.CreateBlobStream
> (KaDatabase.KaData.TAB_Kanew.FieldByName('TABELLE'),bmReadWrite);
>
> 'Blobstream' is declared as TIBBlobStream.
> 'KaDatabase.KaData.TAB_Kanew' is the IBTable-Component.
> 'Tabelle' is the name of the Blobfield in the database.

This code load data from file:

IB_Query1.Append;
IB_Query1.FieldByName('FILENAME').AsString:=FileName;
IB_Query1.FieldByName('FILEBLOB').LoadFromFile(FileName);
IB_Query1.Post;
IB_Query1.Refresh;


For steams you can use SetBlobData(ABuffer: Pointer; ASize: integer )
procedure....

WBR, Dmitry Beloshistov AKA [-=BDS=-]
e-mail: torin@...