Subject [IBO] Re: BlobStream problem
Author michaelgaihede
Sure - how do you want it ?

--- In IBObjects@yahoogroups.com, jwharton@i... wrote:
> It is very possible that it is a bug that I need to address.
> Will you furnish a sample application that shows the problem you
are experiencing.
>
> Jason Wharton
> www.ibobjects.com
>
> -------------------------------------------------------------------
-------------
> -------------------------------------------------------------------
-------------
> Jason,
>
> It appears that whenever the CreateBlobStream method is passed a
> bsmReadWrite mode-parameter, it's unable to read from the stream,
> regardless of how the stream is created (from either a TIB_Query
or
> e.g. using TIB_BlobStream.CreateForColumn).
>
> Using bsmRead when reading from the stream does work correctly, as
> does bsmWrite when writing to the stream. But if it's not a bug,
> what's the bsmReadWrite parameter for (implying you cannot read
from
> or write to the same stream) ?
>
> Best regards,
>
> Michael
>
>
>
> --- 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