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=SelYea r order by CorpOrder;
END CorpGoal_Select ;
-----------------following Code I thought should
work-----------------------------------------------------------------------
Dim cnnOracle
Dim cmdStoredProc
Dim rsEmp
Set cnnOracle = Server.CreateOb ject("ADODB.Con nection")
cnnOracle.Curso rLocation = adUseClient
cnnOracle.Open "Provider=OraOL EDB.Oracle;" & _
"Data Source=database name;" & _
"User Id=login;" & _
"Password=passw ord"
Set cmdStoredProc = Server.CreateOb ject("ADODB.Com mand")
Set cmdStoredProc.A ctiveConnection = cnnOracle 'Call the above procedure.
'This code creates a command object.
Set cmdStoredProc = Server.CreateOb ject("ADODB.Com mand")
Set cmdStoredProc.A ctiveConnection = cnnOracle
'Retrieve all records.
cmdStoredProc.C ommandText = "{call packperson.allp erson({'1998',r esultset
9,})}"
cmdStoredProc.C ommandType = adCmdText
'This code creates a recordset object.
Set rsEmp = Server.CreateOb ject("ADODB.Rec ordset")
rsEmp.CursorTyp e = adOpenStatic
Set rsEmp.Source = cmdStoredProc
rsEmp.Open
cnnOracle.close
set cnnOracle = Nothing
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.534 / Virus Database: 329 - Release Date: 11/1/2003