Subject | Re: [IBO] BLOBs and Interbase 7 |
---|---|
Author | Helen Borrie |
Post date | 2003-03-04T09:18:30Z |
At 10:37 AM 4/03/2003 +0200, you wrote:
InterBase...
Firebird supports assigning a string to a blob, whereas InterBase doesn't?
is a variant. A string (e.g. as in Firebird) can be a variant, but a blob
can't. So, for InterBase, you need to assign a specific compatible type to
a Blob: an actual blob, a TStrings descendant or a TStream
descendant. Use a suitable method for the assignment: LoadFromStream,
Assign, AssignTo, etc. For blob-to-blob, you can use AsString (even though
the objects are not strings, AsString is the streaming method...)
Helen
> Try ParamByName['itsName'].AsStringHmm. I think you are getting caught up with a missing capability in
>does not work.
InterBase...
> > At 10:12 AM 4/03/2003 +0200, you wrote:What kind of buffer are you getting Value from? I guess you know that
> > >We have a problem when trying to update a blob in interbase 7
> > >the error is:
> > >
> > >Conversion error from string "BLOB"
> > >
> > >The exact same thing works on firebird,
Firebird supports assigning a string to a blob, whereas InterBase doesn't?
> > >The Value method will only work if the object from which you are assigning
> > >the SQL has one parameter of type blob, we have always set this blob
> > >parameter using Param.Value :=
is a variant. A string (e.g. as in Firebird) can be a variant, but a blob
can't. So, for InterBase, you need to assign a specific compatible type to
a Blob: an actual blob, a TStrings descendant or a TStream
descendant. Use a suitable method for the assignment: LoadFromStream,
Assign, AssignTo, etc. For blob-to-blob, you can use AsString (even though
the objects are not strings, AsString is the streaming method...)
Helen
> > >
> > >i have also tried Param.SetBlobData and Param.AsBlob
> > >with no success