Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Please Help,Oracle 9I Store Proc and ASP.

Reply
Thread Tools

Please Help,Oracle 9I Store Proc and ASP.

 
 
Rick
Guest
Posts: n/a
 
      11-04-2003
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


 
Reply With Quote
 
 
 
 
dlbjr
Guest
Posts: n/a
 
      11-05-2003
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

--
-dlbjr

Discerning resolutions for the alms


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Proc vs lambda vs proc Minkoo Seo Ruby 19 02-06-2007 11:13 AM
proc A def/calls proc B: variable scoping rules. NevilleDNZ Python 9 08-16-2006 04:36 AM
Convert VB.NET to TSQL PROC & Reference a Proc from another Proc David Lozzi ASP .Net 3 06-01-2005 06:35 PM
Why no Proc##[]=() ? Why no Proc##replace() ? Jean-Hugues ROBERT Ruby 14 05-05-2004 01:20 PM
What is the diff btwn 'sho proc' and 'sho proc cpu' William J King Cisco 1 12-18-2003 11:50 PM



Advertisments