Subject Re: [IBO] Updating BLOB field
Author Helen Borrie
At 07:26 PM 12/02/2004 +0000, you wrote:
>I need to update a blob field via SQL. I am trying this:
>
>Update MyTable
>set MyBlobField = :BlobParam where MyTable_ID = :IDParam
>
>How do I assign the value to 'BlobParam'? I can 'LoadFromFile' but I
>have it in a memory stream. The Param.Assign wants a TIB_Column, not
>a memory stream, and I don't see any .LoadFromStream method.

Use the Assign method of TIB_ColumnBlob:
ParamByName('BlobParam').Assign(MyStream);

It should work without casting if the query is prepared but, if not:
TIB_ColumnBlob(ParamByName('BlobParam')).Assign(MyStream);

Helen