Xref: alice comp.databases.oracle.misc:56649
Path: alice!news-feed.fnsi.net!netnews.com!cpk-news-hub1.bbnplanet.com!news.gtei.net!newspump.sol.net!news.execpc.com!newspeer.sol.net!posts0.nwblwi.newsops.execpc.com!posts.news.choice.net!reader1-dytnoh.news.choice.net!not-for-mail
From: "Dana Jian" <dana_jian@hotmail.com>
Newsgroups: comp.databases.oracle.misc
Subject: Help! Oracle8i--table as output parameter??
Date: Tue, 4 Apr 2000 11:07:08 -0400
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Lines: 49
Message-ID: <38ea051c$0$1380@news.choice.net>
Organization: ChoiceNet - Cincinnati, OH
X-Trace: b\Pm4C1RYD;<>B:AIRX>e1U4i5_2dV@D4\R?hmb`ZlC<^\d;oAADGm=?H9<]Q;Jjc:e@?<igX?FV0n4eSXiZh>B;
X-Complaints-To: abuse@choice.net

Hello,

In Oracle8, we can create a procedure which pass array as output parameters
to Visual Basic.

for example,
TYPE ty_id IS TABLE OF EMPLOYEE.EMP_ID%TYPE
  INDEX BY BINARY_INTEGER;
TYPE ty_name IS TABLE OF EMPLOYEE.EMP_NAME%TYPE
  INDEX BY BINARY_INTEGER;


PROCEDURE SP_GET_ALL_CLASS_OBJECT_COUNT
(
 in_class_id     IN  NUMBER,
 emp_name     OUT    ty_name,
 emp_id     OUT    ty_id
)
IS

v_count         NUMBER DEFAULT 1;

CURSOR cr_result IS
SELECT emp_id, emp_name
FROM Employee
WHERE ....

BEGIN
  For v_one IN cr_result LOOP
    emp_id(v_count)  := v_one.emp_id;
    emp_name(v_count)  := v_one.emp_name;

      v_count := v_count + 1;
  END LOOP;


Now, my question is, how to do the same in Oracle8i??
When I was trying to do the same with Oracle 8i, there's error message--
Oracle8i use REF Cursor to pass back the result set.

In Oracle8i(we're using OLEDB driver), is there any way to pass array back
to VB???

Thanks a LOT for your help, we greatly appreciate it!

Dana
dana_jian@hotmail.com


