Page 1 of 1

Error While Create Procedure With TZSqlProcessor

Posted: 11.10.2010, 19:29
by devil_inside
Hi all...
I want create Database with all database object...
but an error occurred while ZSqlProcessor create Stored Procedure.
here the Error Message :
Image

here my Stored Procedure :

Code: Select all

SET TERM ^ ;

CREATE OR ALTER PROCEDURE LOGINPROC (
    USERNAME VARCHAR(25),
    PWD CHAR(16))
RETURNS (
    RULE CHAR(15),
    LOGHASIL SMALLINT)
AS
declare variable opwd char(16);
declare variable usrname varchar(25);
begin
    select r.TYPE_ROLE,pt.NAMA_PETUGAS,pt.PASS
    from tb_role r inner join PETUGAS pt on r.ID_ROLE=pt.HAK_AKSES
    where pt.nama_petugas=:USERNAME and pt.PASS=:PWD
    into :rule,:usrname,:OPWD;
    if (:USERNAME = :usrname)THEN
        BEGIN
            LOGHASIL=1;
            SUSPEND;
        END else
        BEGIN
            EXCEPTION LOGIN_GAGAL;
            LOGHASIL=0;
            EXIT;
        END
end^

SET TERM ; ^
MyDelphi Code :

Code: Select all

prosesor:=TZSqlProcessor.Create(self);
      Try
        Prosesor.Connection:=koneksi.con;
        prosesor.Script.Clear;
        prosesor.ParamCheck:=True;
        prosesor.Delimiter:='^';
        prosesor.DelimiterType:=dtSetTerm;
        prosesor.Script.LoadFromFile(script);
        prosesor.Parse;
        prosesor.Execute;
      Finally
        FreeAndNil(Prosesor);
      End;
//script = string Variable of myFile.
if i use ISQL my DDL script are work without any error..so i think the problem is on ZeosLib.

btw i dont speak english verry well :lol:

- D2010
- ZEOS 7 Alpha
- Firebird 2.5

Posted: 11.10.2010, 19:44
by seawolf
Change delimiter property to ^

Posted: 11.10.2010, 19:56
by devil_inside
hi seawolf..
the error still occured :(
are the Trunk SVN can solve my problem?

Posted: 12.10.2010, 16:24
by devil_inside
case solved i set Property ParamCheck to False :D
ZEOS Rock!!!