InsaneProgrammer
Programmer
I am trying to pass 10 parameters to an Oracle procedure and get a recordset returned. The procedure executes correctly in SQL*Plus and when called from an Oracle form. I have searched microsofts knowledge base, oracles metalink, and google extensively and tried numerous ways. The code from my latest attempt is below.
<%
Conn = "UID=xxx;PWD=xxx;driver=" _
& "{Microsoft ODBC for Oracle};SERVER=xxx;"
Set Cn = Server.CreateObject("ADODB.Connection"
With cn
.ConnectionString = Conn
.Open
End with
Set Rs = Server.CreateObject("ADODB.Recordset"
Set cmdProjects = server.CreateObject("ADODB.Command"
pProjectNumber = ""
pProjectStatus = "0"
pProjectType = "0"
pProjectManager = "0"
pBranchName = "0"
pScopeColor = "0"
pScheduleColor = "0"
pBudgetColor = "0"
pOtherColor = "0"
pColor = "0"
With cmdProjects
.activeconnection = Cn
.commandtext = "projects_pkg.filtered_projects"
.commandtype = adCmdStoredProc
.parameters.append pProjectNumber
.parameters.append pProjectStatus
.parameters.append pProjectType
.parameters.append pProjectManager
.parameters.append pBranchName
.parameters.append pScopeColor
.parameters.append pScheduleColor
.parameters.append pBudgetColor
.parameters.append pOtherColor
.parameters.append pColor
Set Rs = .Execute (,,adCmdStoredProc)
End With
Do While Not Rs.eof
response.write Rs(0) & ", " & Rs(1) & ", " & Rs(2) & ", " & Rs(3) & ", " & Rs(4) & ", " & Rs(5) & ", " & Rs(6) & ", " & Rs(7)
response.write "<BR>"
Rs.MoveNext
Loop
%>
The error message I get is:
Provider error '80020005'
Type mismatch.
The line in red is where the error occurs. Any help would be greatly appreciated.
InsaneProgrammer.com
<%
Conn = "UID=xxx;PWD=xxx;driver=" _
& "{Microsoft ODBC for Oracle};SERVER=xxx;"
Set Cn = Server.CreateObject("ADODB.Connection"
With cn
.ConnectionString = Conn
.Open
End with
Set Rs = Server.CreateObject("ADODB.Recordset"
Set cmdProjects = server.CreateObject("ADODB.Command"
pProjectNumber = ""
pProjectStatus = "0"
pProjectType = "0"
pProjectManager = "0"
pBranchName = "0"
pScopeColor = "0"
pScheduleColor = "0"
pBudgetColor = "0"
pOtherColor = "0"
pColor = "0"
With cmdProjects
.activeconnection = Cn
.commandtext = "projects_pkg.filtered_projects"
.commandtype = adCmdStoredProc
.parameters.append pProjectNumber
.parameters.append pProjectStatus
.parameters.append pProjectType
.parameters.append pProjectManager
.parameters.append pBranchName
.parameters.append pScopeColor
.parameters.append pScheduleColor
.parameters.append pBudgetColor
.parameters.append pOtherColor
.parameters.append pColor
Set Rs = .Execute (,,adCmdStoredProc)
End With
Do While Not Rs.eof
response.write Rs(0) & ", " & Rs(1) & ", " & Rs(2) & ", " & Rs(3) & ", " & Rs(4) & ", " & Rs(5) & ", " & Rs(6) & ", " & Rs(7)
response.write "<BR>"
Rs.MoveNext
Loop
%>
The error message I get is:
Provider error '80020005'
Type mismatch.
The line in red is where the error occurs. Any help would be greatly appreciated.
InsaneProgrammer.com