i have test stored proc sample:
Code: Select all
create procedure Z_TEST @ID INTEGER, @RES INTEGER OUTPUT
as
SET NOCOUNT ON
SELECT @RES = @ID
Code: Select all
with ZStoredProc1 do
begin
ZStoredProc1.ParamCheck := false;
StoredProcName := 'Z_TEST';
Params.CreateParam(ftInteger, '@RETURN_VALUE', ptResult);
Params.CreateParam(ftString, '@ID', ptInput);
Params.CreateParam(ftInteger, '@RES', ptOutput);
ParamByName('@ID').AsInteger := 100;
ExecProc; // here all ok
res := ParamByName('@RES').AsInteger;
ParamByName('@ID').AsInteger := 200;
ExecProc; // here exception
res := ParamByName('@RES').AsInteger;
end;
Procedure or function 'Z_TEST' expects parameter '@RES', which was not supplied."