Please Help,Oracle 9I Store Proc and ASP.

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
 
D

dlbjr

Dim cnnOracle
Dim cmdStoredProc
Dim rsEmp

Set cnnOracle = Server.CreateObject("ADODB.Connection")
cnnOracle.Open "Provider=OraOLEDB.Oracle;" & _
"Data Source=databasename;" & _
"User Id=login;" & _
"Password=password"

Set cmdStoredProc = Server.CreateObject("ADODB.Command")
Set cmdStoredProc.ActiveConnection = cnnOracle
cmdStoredProc.CommandText = "{call
packperson.allperson({'1998',resultset9,})}"
cmdStoredProc.CommandType = adCmdText
Set rsEmp = Server.CreateObject("ADODB.Recordset")
rsEmp.Open cmdStoredProc.Execute
set rsEmp = Nothing
rsEmp.close
set cnnOracle = Nothing
set cmdStoredProc = Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top