I want create Database with all database object...
but an error occurred while ZSqlProcessor create Stored Procedure.
here the Error Message :
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 ; ^
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.
btw i dont speak english verry well
- D2010
- ZEOS 7 Alpha
- Firebird 2.5