Dynamic SQL ErrorSQL error code = -303 - string right truncation
Posted: Wed 19 Jun 2013 00:34
Hi,
I use FireBird 2.5.1 and I got strange error when I tried to select a stored procedure. I used the component TIBCSQL with this code:
And I get this error when I use ExecuteNext as described with the comment above
I tried to call myproc inside IBExpert like that
and it work successfully
looking for your urgent replay to be able to continue my work.
Thanks
I use FireBird 2.5.1 and I got strange error when I tried to select a stored procedure. I used the component TIBCSQL with this code:
Code: Select all
TIBCSQL.SQL.Text := 'Select f_id, o_log from myproc (0)';
TIBCSQL.Params.CreateParam(ftInteger, 'p1', ptOutPut);
TIBCSQL.Params.CreateParam(ftString, 'p2', ptOutPut);
TIBCSQL.Prepare;
TIBCSQL.Execute;
while TIBCSQL.ExecuteNext do begin //<<------ error -303 here
memo1.Lines.Add(TIBCSQL.ParamByName('p2').AsString);
end;
TIBCSQL.UnPrepare;
TIBCSQL.SQL.Clear;MyProc script (it is still a template test for something bigger)Dynamic SQL ErrorSQL error code = -303
arithmetic exception, numeric overflow, or string truncation
string right truncation.
Code: Select all
create or alter procedure myproc (
inp_ID smallint)
returns (
f_ID smallint,
O_LOG varchar(100) character set WIN1252)
as
begin
select f_ID from mytable1
where f2_ID = 127
into :f_id;
o_log = 'st 1';
select f2 from mytable2
where f3_id = 33
into :o_log;
suspend;
endCode: Select all
Select f_id, o_log from myproc (0)looking for your urgent replay to be able to continue my work.
Thanks