Intranet Journal   Earthweb  
Events Jobs Premium Services Media Kit Network Map E-mail Offers Vendor Solutions Webcasts

   Intranet Journal Subjects
Search Earthweb

Privacy Policy



internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

internet commerce
Be a Commerce Partner
















 

[ Home | Discussion Forum | How Do I... | Lotus Notes Intranets | Microsoft SharePoint | Products | Shopping  ]

free news!


Problem in Retrieving An Array From Oracle Stored Procedure !


[ Follow Ups ] [ Post Followup ] [ Intranet eXchange ] [ IDM Home ]


Posted by Joe on May 22, 2002 at 9:5:36:

I am trying to return an array of char values from oracle (8.1.7) stored procedure to ASP. My procedure follows:

create or replace type char_varray is varray(200) of char(15);
/

create or replace procedure getusers(username out nocopy char_varray) is
cursor users_cursor is
select username from users;

percount number default 1;
begin
username := char_varray();
for users_record in users_cursor loop
username.extend;
username(percount) := users_record.username;
percount := percount + 1;
end loop;
end;
/

I am able to get the array of values in SQL*Plus, but, NOT in ASP. The ASP code I use:

Set cmdStoredProc = Server.CreateObject("ADODB.Command")
Set cmdStoredProc.ActiveConnection = Conn ' a valid database connection
cmdStoredProc.CommandText = "getusers"
cmdStoredProc.CommandType = 4 'adCmdText

T = (&H2000 OR 129) 'adArray or adChar
set param = cmdStoredProc.createparameter("username", T, 2, 2000, "")
cmdStoredProc.parameters.append param

cmdStoredProc.Execute

When I load this page, I am getting the following error:

ADODB.Command error '800a0d5d'

Application uses a value of the wrong type for the current operation.

I am able to retrieve one single char value. NOT an array of char values. I use ADO 2.7.

Any help would be greatly appreciated.

Thanks.



Follow Ups:



Post a Followup

Name:     
E-Mail:   
Subject:  
Message:

Optional Link URL: 
Link Title:        

      




[ Follow Ups ] [ Post Followup ] [ Intranet eXchange ] [ IDM Home ]


email this page

Tutorials
and more at:
Intranet Journal's Tutorials
Intranet Journal Favorites

Creating a PHP-Based Content Management System

The Spyware Guide

Introduction to Microsoft SharePoint Portal

Intranet Journal
Part of the EarthWeb Network

Managing Editor
Intranet Journal

Tom Dunlap

EarthWeb Home Page
Jupitermedia Home Page

Media Kit



internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs