ZStoredProc bug?

Forum related to MS SQL Server

Moderators: gto, cipto_kh, EgonHugeist

jk
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 27.11.2008, 09:02

ZStoredProc bug?

Postby jk » 27.11.2008, 09:12

Zeos 6.6.4 + MSDE 2005 + Delphi7

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


than i try to use it:

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;


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."

jk
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 27.11.2008, 09:02

Postby jk » 27.11.2008, 15:04

the same problem i reproduced using firebird 2.0
but instead of sql error i've got access violation :(

jk
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 27.11.2008, 09:02

Postby jk » 28.11.2008, 10:18

i think i fixed this problem, if anyone interested patch here:
http://jk.at.tut.by/zeos_6.6.4.patch.zip

but may be i broke something else :blink2:


Return to “MS SQL Server”

Who is online

Users browsing this forum: No registered users and 1 guest