ZStoredProc bug?
Posted: 27.11.2008, 09:12
Zeos 6.6.4 + MSDE 2005 + Delphi7
i have test stored proc sample:
than i try to use it:
and at second call ExecProc i have an exception: "General SQL Server error: Check messages from the SQL Server.
Procedure or function 'Z_TEST' expects parameter '@RES', which was not supplied."
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."