Guest_imported
New member
- Jan 1, 1970
- 0
I want to execute stored procedure in ASP with Javascript, but it keeps failing... i don't know why.. please, help...
create or replace procedure sp_badword( word in varchar2,status out
varchar2 )
is
CURSOR BADWORD_CUR IS
SELECT BADWORD FROM SY_BADWORDS WHERE BADWORD = word;
BADWORD_REC BADWORD_CUR%ROWTYPE;
begin
OPEN BADWORD_CUR;
FETCH BADWORD_CUR INTO BADWORD_REC;
IF( BADWORD_CUR%ROWCOUNT > 0 ) THEN
status := 'TRUE';
ELSE
status:='FALSE';
END IF;
CLOSE BADWORD_CUR;
end;
----------------------------------------------------------
dbopen(); // return Conn object
var cmd = Server.CreateObject("ADODB.Command"
cmd.ActiveConnection = Conn;
cmd.CommandText = "sp_badword";
cmd.CommandType = adCmdStoredProc;
cmd.Parameters.Append.CreateParameter("status", adChar, adParamReturnValue);
cmd.Parameters.Append.CreateParameter("word", adChar,adParamInput, 30);
cmd.Parameters("word" = "badword";
cmd.Execute();
Response.Write( "status = " + cmd.Parameters("status".Value );
dbclose();
create or replace procedure sp_badword( word in varchar2,status out
varchar2 )
is
CURSOR BADWORD_CUR IS
SELECT BADWORD FROM SY_BADWORDS WHERE BADWORD = word;
BADWORD_REC BADWORD_CUR%ROWTYPE;
begin
OPEN BADWORD_CUR;
FETCH BADWORD_CUR INTO BADWORD_REC;
IF( BADWORD_CUR%ROWCOUNT > 0 ) THEN
status := 'TRUE';
ELSE
status:='FALSE';
END IF;
CLOSE BADWORD_CUR;
end;
----------------------------------------------------------
dbopen(); // return Conn object
var cmd = Server.CreateObject("ADODB.Command"
cmd.ActiveConnection = Conn;
cmd.CommandText = "sp_badword";
cmd.CommandType = adCmdStoredProc;
cmd.Parameters.Append.CreateParameter("status", adChar, adParamReturnValue);
cmd.Parameters.Append.CreateParameter("word", adChar,adParamInput, 30);
cmd.Parameters("word" = "badword";
cmd.Execute();
Response.Write( "status = " + cmd.Parameters("status".Value );
dbclose();