Subject Basic blob prob - simple tests
Author Paul Hope
I have carried out some simple tests on this problem and am even more
perplexed.

I have an IB_Cursor with a transaction set to autocommit.

I have a table 'do_header' which has a primary key 'do_no' and a blob
sub_type 1 'delivery_address'.

if I

procedure TForm1.Button1Click(Sender: TObject);
begin
with ibc do
begin
SQL.Text:='Insert into do_header(do_no,delivery_address)values(1,:da);
ParamByName('da').Assign(memo1.Lines);
ExecSQL;
end;
end;

This works fine.

if I create a stored procedure

create procedure testda
(dono integer,
da blob sub_type 1
)returns(
mess varchar(30))
as
begin
insert into do_header(do_no,delivery_address)values(:dono,:da);
mess='OK';
suspend;
end

and then

procedure TForm1.Button1Click(Sender: TObject);
begin
with ibc do
begin
sql.text:='select * from testda(4,:da)';
ParamByName('da').Assign(memo1.Lines);
Open;
label1.caption:=fields[0].asstring; // this returns 'OK'
end;
end;

it creates the new record with do_no=4 but the delivery address is empty :-(

Have I missed something simple here, am I going loopy or is there a problem?

Regards
Paul