Subject Re: [firebird-support] Input BLOB parameter problem in Stored Procedure
Author Helen Borrie
At 07:55 AM 12/02/2008, you wrote:
>Hi. FB 1.5.3 SS in W2K. I have a SP:
>
>CREATE PROCEDURE My_SP (
> SomeParams ...,
> MyBLOBParam BLOB sub_type 0 segment size 80,
> MoreParams ...)
>AS
>....
>
>I invoke that SP from another SP, and when I put some string in the Blob
>param, I received the following error:
> "Arithmetic overflow or division by zero has occurred. arithmetic
>exception, numeric overflow, or string truncation."
>When the blob is NULL everything is OK. I use the BLOB parameter "only" in
>an INSERT statement.
>
>The line to invoke:
>EXECUTE PROCEDURE My_SP (..someparams.., 'A string not bigger that 100
>characters', .. moreparams..);

Your SP declaration expects a BLOB, not a string. Change the declaration to pass a varchar(100) instead (or whatever size varchar() you need to avoid overflow, up to a limit of 32,765 BYTES). The insert statement will accept a string as the input to a text BLOB but you cannot pass a string as the argument to a BLOB parameter - data types must match.

./heLen