views:

50

answers:

0

I have found the following ASP VB code from Microsoft Support, and as it is stated it should print in my browser the parameters that are required from my called stored procedure. I get the following error when I run it in my browser:

Microsoft OLE DB Provider for Oracle (0x80040E14)
ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to     
'GET_HDR_NEXTVAL' ORA-06550: line 1, column 7: PL/SQL: Statement ignored
 /test_stored_procedure_call_4.asp, line 21

Line 21 reflects to:

 cmd.Parameters.Refresh

ASP Code

 <%@ LANGUAGE = VBScript %>
 <!-- #include file="adovbs.inc" -->
 <HTML>
 <HEAD><TITLE>Stored Proc Example</TITLE></HEAD>
 <BODY>

 <%
 Set Conn = Server.CreateObject("ADODB.Connection")

 ' The following line must be changed to reflect your data source info
 Conn.ConnectionString = "Provider=MSDAORA.1;Data Source=dbase;User Id=user;Password=pass;"
 Conn.Open
 set cmd = Server.CreateObject("ADODB.Command")
 set cmd.ActiveConnection = Conn

 'Specify the name of the stored procedure you wish to call
  cmd.CommandText = "sct_info.get_hdr_nextval"
cmd.CommandType = adCmdStoredProc

 'Query the server for what the parameters are
 cmd.Parameters.Refresh
 %>
 <Table Border=1>
 <TR>
  <TD><B>PARAMETER NAME</B></TD>
  <TD><B>DATA-TYPE</B></TD>
  <TD><B>DIRECTION</B></TD>
  <TD><B>DATA-SIZE</B></TD>
 </TR>
 <% For Each param In cmd.Parameters %>
 <TR>
  <TD><%= param.name %></TD>
  <TD><%= param.type %></TD>
  <TD><%= param.direction %></TD>
  <TD><%= param.size %></TD>
 </TR>
 <%
  Next
  Conn.Close
 %>
 </TABLE>
 </BODY>
 </HTML>

Any ideas how to deal with this? Thank you.