Error While Create Procedure With TZSqlProcessor

The alpha/beta tester's forum for ZeosLib 7.0.x series

Report problems concerning our Delphi 2009+ version and new Zeoslib 7.0 features here.

This is a forum that will be removed once the 7.X version goes into stable!!

Moderators: gto, EgonHugeist, olehs

Locked
devil_inside
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 11.10.2010, 19:05
Contact:

Error While Create Procedure With TZSqlProcessor

Post 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
Last edited by devil_inside on 11.10.2010, 20:00, edited 5 times in total.
seawolf
Zeos Dev Team *
Zeos Dev Team *
Posts: 385
Joined: 04.06.2008, 19:50
Contact:

Post by seawolf »

Change delimiter property to ^
devil_inside
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 11.10.2010, 19:05
Contact:

Post by devil_inside »

hi seawolf..
the error still occured :(
are the Trunk SVN can solve my problem?
devil_inside
Fresh Boarder
Fresh Boarder
Posts: 4
Joined: 11.10.2010, 19:05
Contact:

Post by devil_inside »

case solved i set Property ParamCheck to False :D
ZEOS Rock!!!
Locked