Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

calling oracle procedure from asp

nf531aMay 17 2002
I am trying to run an Oracle procedure through ASP. The procedure is expecting an input and will return an output value. When I define the input as an integer variable, the procedure runs fine in asp. However, I need to define it as a varchar2. When I do this, I get a "A specified type was invalid". I don't understand why. Here is the code:


**********************************************************************************

<%@ Language="VBScript" %>
<%Option Explicit%>
<html>
<head>
<title>
Remote procedure call test
</title>
</head>
<body>
This makes a connection to marsor83 to run a remote procedure in aresor72
<HR>
<!-- #include file="adovbs.inc" -->
<%

Dim conn
Dim cmd
Dim param1
Dim param2

set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DSN=mydb;UID=scott;PWD=tiger"


set cmd = Server.CreateObject("ADODB.Command")
set cmd.ActiveConnection = Conn
cmd.CommandText = "GetEmployeeName@aresor72"
cmd.CommandType = adCmdStoredProc

set param1 = cmd.CreateParameter("CONTROL_CHAR",adVarChar,adParamInput,10)
cmd.Parameters.Append param1
cmd.Parameters("CONTROL_CHAR") ="7844"

set param2 = cmd.CreateParameter("AGENCY",adVarChar,adParamOutput,9)
cmd.Parameters.Append param2

cmd.execute

%>

</body>
</HTML>
*****************************************************************************


Can anyone help me please! Any help is appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 14 2002
Added on May 17 2002
2 comments
1,141 views