R
Rick
Package header named RecordSetPKG as follows
as
--Package defines the type ref cursor stored procedures will use varables
of this type to stored
--multple records back to the calling stored procedure
TYPE m_refcur IS REF CURSOR;
end Recordsetpkg;
Procedure is
CorpGoalSelect
(SelYear in int,io_cursor OUT recordsetpkg.m_refcur)
is
Begin
open io_cursor for
SELECT * FROM CorpGoals where CorpYear=SelYear order by CorpOrder;
END CorpGoal_Select;
-----------------following Code I thought should
work-----------------------------------------------------------------------
Dim cnnOracle
Dim cmdStoredProc
Dim rsEmp
Set cnnOracle = Server.CreateObject("ADODB.Connection")
cnnOracle.CursorLocation = adUseClient
cnnOracle.Open "Provider=OraOLEDB.Oracle;" & _
"Data Source=databasename;" & _
"User Id=login;" & _
"Password=password"
Set cmdStoredProc = Server.CreateObject("ADODB.Command")
Set cmdStoredProc.ActiveConnection = cnnOracle 'Call the above procedure.
'This code creates a command object.
Set cmdStoredProc = Server.CreateObject("ADODB.Command")
Set cmdStoredProc.ActiveConnection = cnnOracle
'Retrieve all records.
cmdStoredProc.CommandText = "{call packperson.allperson({'1998',resultset
9,})}"
cmdStoredProc.CommandType = adCmdText
'This code creates a recordset object.
Set rsEmp = Server.CreateObject("ADODB.Recordset")
rsEmp.CursorType = adOpenStatic
Set rsEmp.Source = cmdStoredProc
rsEmp.Open
cnnOracle.close
set cnnOracle = Nothing
as
--Package defines the type ref cursor stored procedures will use varables
of this type to stored
--multple records back to the calling stored procedure
TYPE m_refcur IS REF CURSOR;
end Recordsetpkg;
Procedure is
CorpGoalSelect
(SelYear in int,io_cursor OUT recordsetpkg.m_refcur)
is
Begin
open io_cursor for
SELECT * FROM CorpGoals where CorpYear=SelYear order by CorpOrder;
END CorpGoal_Select;
-----------------following Code I thought should
work-----------------------------------------------------------------------
Dim cnnOracle
Dim cmdStoredProc
Dim rsEmp
Set cnnOracle = Server.CreateObject("ADODB.Connection")
cnnOracle.CursorLocation = adUseClient
cnnOracle.Open "Provider=OraOLEDB.Oracle;" & _
"Data Source=databasename;" & _
"User Id=login;" & _
"Password=password"
Set cmdStoredProc = Server.CreateObject("ADODB.Command")
Set cmdStoredProc.ActiveConnection = cnnOracle 'Call the above procedure.
'This code creates a command object.
Set cmdStoredProc = Server.CreateObject("ADODB.Command")
Set cmdStoredProc.ActiveConnection = cnnOracle
'Retrieve all records.
cmdStoredProc.CommandText = "{call packperson.allperson({'1998',resultset
9,})}"
cmdStoredProc.CommandType = adCmdText
'This code creates a recordset object.
Set rsEmp = Server.CreateObject("ADODB.Recordset")
rsEmp.CursorType = adOpenStatic
Set rsEmp.Source = cmdStoredProc
rsEmp.Open
cnnOracle.close
set cnnOracle = Nothing