Subject Re: [IBO] BlobStream problem
Author gbehnke2000
Hi Michael,

i have no problems with blobstreams i use blobstreams like this:

for writing:
TIB_BlobStream *stream_Blob_RTF = ibdsql_InsertDocument-
>CreateBlobStream(ibdsql_InsertDocument->ParamByName(_F_TEXT_RTF),
bsmReadWrite);
or reading:

TStream* stream_Blob = IB_DSQL->CreateBlobStream(IB_DSQL->FieldByName
(_F_TEXT_RTF), bsmRead);

As you can see i work with C++ (CBUILDER6) but i think in delphi it
should work in the same manner.

Regards
Gerhard

--- In IBObjects@yahoogroups.com, jwharton@i... wrote:
> Use the TIB_Dataset.CreateBlobStream() method instead of directly
instantiating your own instance.
>
> Jason Wharton
> www.ibobjects.com
>
> --------------------------------------------------------------------
------------
> --------------------------------------------------------------------
------------
> Hi,
>
> I'm having trouble reading/writing from a blobstream. After opening
a
> TIB_Query with a blob field, I create the blobstream field:
>
> FStream := TIB_BlobStream (FDS.CreateBlobStream(FDS.FieldByName
> (FBlobFieldName), bsmReadWrite));
>
> If the mode is set to bsmReadWrite, the internal blobstream size is
> set to 0, and all subsequent reads from the stream will fail. When
> using bsmRead, however, the size is assigned correctly, but writing
> is not possible. The query is in edit mode and the blobfield is not
> ReadOnly. In addition, when opening the field in bsmReadWrite mode,
> I can write to the stream without any problems.
>
> Any suggestions will be highly appreciated.
>
> Best regards and thanks,
>
> Michael