Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Asp working with Oracle Stored Procedures : OraOLEDB (0x80040E51)

Asp working with Oracle Stored Procedures : OraOLEDB (0x80040E51)

From: Mr Not So Know It All <djscratchnsniffing_at_yahoo.com>
Date: 18 Feb 2005 12:47:12 -0800
Message-ID: <1108759632.127891.17240@f14g2000cwb.googlegroups.com>


Im new to working with Oracle. Im trying to send my test DB an input parameter and get an output parameter from a test procedure. I tested the procedure successfully with a parameter.refresh. I was able to get the parameter name and value for input and output parameters. Unfortunately, when I try to send a value to the stored procedure I get the following error:

OraOLEDB (0x80040E51)
Provider cannot derive parameter information and SetParameterInfo has not been called.
/0022/OraclesSP.asp, line 23

<------------------------My Code------------------------------>
<%
	'dataconnection to database
	strConnect = "Provider=OraOLEDB.Oracle;User
ID=scott;Password=tiger;Data Source=EAPP;Persist Security Info=True"
	set objConn=Server.CreateObject("ADODB.connection")
	set objComm=Server.CreateObject("ADODB.Command")
	objConn.open strConnect
	set objComm.ActiveConnection=objConn

	'via Command object with stored procedure stored procedure information
	'Command for Oracle (This works. I get the parameter names and values
successfully)
	With objComm
		.CommandText = "GETDATA"
		.CommandType = 4 'adCmdStorecProc
		.Parameters.refresh
	End With
	response.Write("Parameters Count " & objComm.parameters.count &
"<br>")
	response.Write("P1 : " & objComm.parameters(0).Name & " " &
objComm.parameters(0).type & "<br>")
	response.Write("P2 : " & objComm.parameters(1).Name & " " &
objComm.parameters(1).type & "<br>")
	objComm.commandtype=1 'adCmdText
	objComm.commandtext="{ call GETDATA(?,?) }"
	objComm.Parameters(0).Value=7369 '< line 23 where error is >
	objComm.Execute
	response.Write("REturn & " & objComm.parameters(1) & "<br>")

        objConn.close
	set objConn = nothing

%>

Can someone please help me with ASP and Stored Procedures. Im using an old WROX book - ADO 2.5 RDS Programming with ASP 3.0 as reference. The author of the book demonstrates various ways to create parameters and access to Oracle. I tried creating parameters and appending to a command object, but that failed, too. Im open to whatever method works. The author seems to like using the ODBC call syntax -> { call GETDATA(?,?) }. He notes it works like manually appending parameters to the Parameters collection.

Thanks in Advance. Received on Fri Feb 18 2005 - 14:47:12 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US