Subject Stored Proc with blob parameter: internal error
Author Daniel Albuschat

I've experienced an "internal error" when
I execute a stored procedure that takes
a blob parameter and inserts it's data
into a table.
Here's a test case:

# isql
SQL> create database "test.fdb";
SQL> create table test( text blob sub_type 1 );
SQL> set term ^;
SQL> create procedure insert_test( text blob sub_type 1 ) as
CON> begin
CON> insert into test( text ) values ( :text );
CON> end^
SQL> execute procedure insert_test( null )^
SQL> execute procedure insert_test( 'foo' )^
Statement failed, SQLCODE = -902

internal error

The strange thing is, when I execute it from my application,
using parameters instead of directly putting the values
in the statement, it works flawlessly.

But, unfortunately, I have to call this stored procedure
from another stored procedure. And here, again, I get the
internal error.

Does somebody know a solution to this problem?

I've tested with the release version of Firebird 1.5
on windows and linux.

Thanks in advance,
Daniel Albuschat

eat(this); // delicious suicide