Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 2nd, 2012, 01:20 AM
Registered User
 
Join Date: Feb 2012
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Returning Oracle Cursor/Array in ASP function

Does anyone know how to return an Oracle datatype which is a table of objects containing the following fields?

label VARCHAR2(50),
value VARCHAR2(100)

When I try the code below, I get an error: Provider error '80040e14' One or more errors occurred during processing of command.
Code:
Set returnVal = .CreateParameter("returnVal",adVarchar,adParamOutput)
Here is the code snippet:
Code:
Set cmdItem = Server.CreateObject("ADODB.Command")
	With cmdItem 
		.CommandText = "{myschema.mypkg.myproc (?,?,?,?,?,?)}"
		.CommandType = adCmdStoredProc
		.ActiveConnection = ORConn
		.Prepared = True
		Set param1 = .CreateParameter("",adNumeric,adParamInput)
		Set param2 = .CreateParameter("",adVarchar,adParamInput,255)
		Set param3 = .CreateParameter("",adNumeric,adParamInput)
		Set param4 = .CreateParameter("",adVarchar,adParamInput,255)
		Set param5 = .CreateParameter("",adVarchar,adParamInput,255)
		Set param6 = .CreateParameter("",adVarchar,adParamInput,255)
		Set returnVal = .CreateParameter("returnVal",adVarchar,adParamOutput)
			
		.Parameters.Append(param1)
		.Parameters.Append(param2)
		.Parameters.Append(param3)
		.Parameters.Append(param4)
		.Parameters.Append(param5)
		.Parameters.Append(param6)
	End With

	With cmdItem 

		.Parameters(0).Value = 1234567
		.Parameters(1).Value = "Credit"
		.Parameters(2).Value = 0
		.Parameters(3).Value = "4111111111111111"
		.Parameters(4).Value = "06"
		.Parameters(5).Value = "14"
		
		Set objRs  = .Execute
	End With





Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling an Oracle function from an ASP page sparky753 Classic ASP Databases 5 March 1st, 2012 12:58 AM
Function returning an array rfstuck Pro VB 6 5 March 12th, 2008 07:35 AM
Oracle Cursor - SQL Plus gbagdona Oracle 3 October 1st, 2006 04:25 AM
Get data from oracle cursor avinash sharma LNCT ADO.NET 0 January 5th, 2005 04:39 AM
Passing an Array from Classic ASP to Oracle Greg Griffiths Oracle ASP 0 June 29th, 2004 11:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.