Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Please Help Oracle Stored Proc and ASP

Please Help Oracle Stored Proc and ASP

From: Rick <mercilessming_2000NOSPAM_at_yahooNOSPAM.com>
Date: Tue, 04 Nov 2003 12:49:14 GMT
Message-ID: <efNpb.61541$fl1.2592299@twister.southeast.rr.com>


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

---
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
Received on Tue Nov 04 2003 - 06:49:14 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US