Page 1 of 1

Stored Procedure Param Size issue with DescribeParams

Posted: Fri 29 Apr 2016 20:22
by lam
I have an issue with the use of StoredProcs, running this code:

Code: Select all

function TForm7.CallStoredProc(param1: integer; param2: string): string;
var IBCStoredProc2: TIBCStoredProc;
begin
  IBCStoredProc1.Connection := IBCConnection1;
  IBCStoredProc1.Options.DescribeParams := true;
  IBCStoredProc1.StoredProcName := 'EXAMPLE_STORED_PROC';
  IBCStoredProc1.Prepare;
  IBCStoredProc1.Params[0].AsInteger := param1;
  IBCStoredProc1.Params[1].AsString := param2;

  IBCStoredProc1.Transaction.Active := True;
  IBCStoredProc1.ExecProc;
  IBCStoredProc1.Transaction.Commit;
  Result := IBCStoredProc1.Params[2].AsString;
end;
The 'EXAMPLE_STORED_PROC' is defined in my firebird DB and expecting 2 input parameters of type Integer. I need to be able to pass the 2nd parameter as String as shown in the code. The problem is that if I send first a string '1' and then, on a subsequent call with the same StoredProc Object I send '4321' the parameter is truncated to '4'.

Can someone tell me what's happening?

Re: Stored Procedure Param Size issue with DescribeParams

Posted: Fri 06 May 2016 07:58
by ViktorV
Thank you for the information. We have reproduced the issue and investigation is in progress. We will inform you when we have any results.