Subject Re: [ib-support] invalid Blod ID error on Firebird
Author Helen Borrie
At 02:15 PM 05-12-02 -0600, you wrote:
>Hi all,
>Info on system:
>Delphi 6.0
>Firebird 1.0.0.796 running on rehat linux
>Using IBx components from Interbase tab in delphi
>I am not having any trouble with any other reads or updates.
>
>Getting a "EIBInterbaseError with message 'invalid Blob ID' when
>trying to update database.
>
>I am using the following stored procedure and I have
>verified in the debugger that all values are being passed.
>
>Could it be the IBx components can not handle the blob in
>Firebird. I intend to move to IBo but have not look at them
>enough to understand which components to use.
>
>thanks to all in advance
>
>UPDATE_CALLDETAIL procedure
>
>begin
>UPDATE CALLDETAIL
>SET
>call_detail_id = :iCallDetailID,
>case_id = :iCaseID,
>support_name_id = :iSupportNameID,
>call_detail_open_date = :iCallDetailOpenDate,
>call_detail_close_date = :iCallDetailCloseDate,
>call_detail_method_ID = :iCallDetailMethodID,
>call_is_open = :iCallIsOpen,
>call_detail_memo = :iCallDetailMemo
>WHERE
>call_detail_id = :iCallDetailID;
>end
George,
There is not enough information here to work out what your problem
is. Assuming call_detail_memo is the blob causing the problem...we'd need
to see the inputs to this SP. You can pass either a blob or a string to a
Firebird text blob (sub_type 1) but the parameter received by the SP has to
be the of the type expected by the procedures.

It can be confusing on the client side in (non-IBO) Delphi because you
actually have to apply the AsString method to assign a blob object to a
blob parameter. However, on the Delphi side, the blob still has to be a
blob, not a string. If the column iCallDetailMemo is a blob, you can't,
for example, do

ParamByName('iCallDetailMemo').AsString := 'I am a blob';

You need to do stuff on the Delphi side to create a blob object by
manipulating streams in and out of stringlists (such as TMemo). There is a
Borland TI sheet somewhere in the knowledgebase on this topic.

So you need to make sure that (on the client side) the parameter is of the
right type for the SP.

heLen