Article View: borland.public.cppbuilder.database.ado
Article #5136Oracle Stored Procedure in ADOExpress
From: Markus Fraessle
Date: Mon, 23 Jul 2001 06:50
Date: Mon, 23 Jul 2001 06:50
48 lines
2149 bytes
2149 bytes
Hi
I want to call an Oracle 8.0 Stored Procedure using ADOExpress
in Borland C++ Builder 5.0. The Stored Procedure will return a
result set defined as a cursor type "IN OUT" parameter (see
definition below). How can I perform this call in ADOExpress
using the TADOStoredProc component ?
Definition of the Stored Procedure in Oracle:
CREATE OR REPLACE PACKAGE TIM_TEST_PKG IS
TYPE all_device IS RECORD (
ser_no device.ser_no%TYPE,
status device.status%TYPE);
TYPE device_cur IS REF CURSOR RETURN all_device;
PROCEDURE q_device ( resultset IN OUT device_cur,
p_aufno IN VARCHAR2,
p_posnr IN VARCHAR2);
END TIM_TEST_PKG;
/
CREATE OR REPLACE PACKAGE BODY TIM_TEST_PKG AS
PROCEDURE q_device ( resultset IN OUT device_cur,
p_aufno IN VARCHAR2,
p_posnr IN VARCHAR2 ) IS
BEGIN
OPEN resultset FOR
SELECT ser_no, status
FROM device
WHERE faufno = p_aufno
AND posnr = p_posnr
ORDER BY ser_no;
EXCEPTION
WHEN NO_DATA_FOUND THEN
Null;
WHEN OTHERS THEN
Null;
END q_Device;
END TIM_TEST_PKG;
/
Any way to do this ?
Thank you.
Technical Details
Message-ID:
<3b5bc906_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,c31636bba7c56ee2,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-07-23 00:02:45 PST From: "Markus Fraessle" <bfi.informatik.fraessle@t-online.de> Newsgroups: borland.public.cppbuilder.database.ado Subject: Oracle Stored Procedure in ADOExpress Date: Mon, 23 Jul 2001 08:50:26 +0200 Lines: 51 Organization: BFI Informatik GmbH X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 NNTP-Posting-Host: 217.3.189.153 Message-ID: <3b5bc906_1@dnews> X-Trace: dnews 995870982 217.3.189.153 (22 Jul 2001 23:49:42 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews