Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

failed to execute stored procedure in ASP.

Status
Not open for further replies.

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();



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top