calling oracle procedure from asp
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.