Hi!
I'm developing a classic ASP application in which I'm supposed to retrieve a recordset from an Oracle procedure.
The Oracleprocedure only has one parameter, an out parameter of type REF CURSOR. The provider we are using is "ASPOraOLEDB.Or acle.1".
I can retrieve strings and other types from the procedures in the same Oracle database but I cannot get the ref cursor to work from ASP.
This is the code in ASP:
Dim lcConnectionStr ing, loConn
lcConnectionStr ing = "Provider=OraOL EDB.Oracle.1;Da ta Source={Datasou rce};Persist Security Info=True;Passw ord=[password};User ID={user}"
Set loConnection = Server.CreateOb ject("ADODB.Con nection")
loConnection.Op en lcConnectionStr ing
Dim loRS
Set loRS = Server.CreateOb ject("ADODB.Rec ordSet")
Set CMD = Server.CreateOb ject("ADODB.Com mand")
CMD.ActiveConne ction = loConnection
cmd.CommandType = adCmdStoredProc
CMD.CommandText = "{call package.utdata( )}"
Set loRS = CMD.Execute()
I am receiving the following error:
OraOLEDB error '80040e14'
ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'UTDATA' ORA-06550: line 1, column 7: PL/SQL: Statement ignored
If I use the following syntax for the command.commant ext: CMD.CommandText = "{call package.utdata( ?)}" I only get an empty resultset which is closed.
I also tried to add an out Parameter to the Command object such as:
CMD.Parameters. Append CMD.CreateParam eter("varde", adVarChar, adParamOutput)
where "varde" is the name of the out parameter in the Oracle procedure. But got the same error.
I know that we have succeded to get data from the same procedure in VBA/Excel but not from ASP.
I will be really thankful if anyone has a solution to this.
I'm developing a classic ASP application in which I'm supposed to retrieve a recordset from an Oracle procedure.
The Oracleprocedure only has one parameter, an out parameter of type REF CURSOR. The provider we are using is "ASPOraOLEDB.Or acle.1".
I can retrieve strings and other types from the procedures in the same Oracle database but I cannot get the ref cursor to work from ASP.
This is the code in ASP:
Dim lcConnectionStr ing, loConn
lcConnectionStr ing = "Provider=OraOL EDB.Oracle.1;Da ta Source={Datasou rce};Persist Security Info=True;Passw ord=[password};User ID={user}"
Set loConnection = Server.CreateOb ject("ADODB.Con nection")
loConnection.Op en lcConnectionStr ing
Dim loRS
Set loRS = Server.CreateOb ject("ADODB.Rec ordSet")
Set CMD = Server.CreateOb ject("ADODB.Com mand")
CMD.ActiveConne ction = loConnection
cmd.CommandType = adCmdStoredProc
CMD.CommandText = "{call package.utdata( )}"
Set loRS = CMD.Execute()
I am receiving the following error:
OraOLEDB error '80040e14'
ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'UTDATA' ORA-06550: line 1, column 7: PL/SQL: Statement ignored
If I use the following syntax for the command.commant ext: CMD.CommandText = "{call package.utdata( ?)}" I only get an empty resultset which is closed.
I also tried to add an out Parameter to the Command object such as:
CMD.Parameters. Append CMD.CreateParam eter("varde", adVarChar, adParamOutput)
where "varde" is the name of the out parameter in the Oracle procedure. But got the same error.
I know that we have succeded to get data from the same procedure in VBA/Excel but not from ASP.
I will be really thankful if anyone has a solution to this.
Comment