Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Oracle ODBC Crystal Reports Stored Procs URGENT!!!!!

RE: Oracle ODBC Crystal Reports Stored Procs URGENT!!!!!

From: <Paula_Stankus_at_doh.state.fl.us>
Date: Tue, 06 Aug 2002 08:38:34 -0800
Message-ID: <F001.004AC3C5.20020806083834@fatcity.com>


We are heading down this same path of using stored proc. and refcursor vs. temporary tables to return data to Crystal feeling it would be faster and easier to maintain. Has anyone done this we have Oracle 8.1.7.2
ODBC 8.0.1 - upgrading this to 8.0.5 or higher Solaris 2.8
Crystal Ver. 8

I need to access some data using Oracle's ODBC. My queries would need some parameters and I thought of using stored procedures to execute the queries and return the result set to the ODBC client. Here is what I did:

CREATE OR REPLACE PACKAGE test IS
TYPE gen_cursor IS REF CURSOR;
END test;
/

CREATE OR REPLACE PROCEDURE procdata(cur OUT test.gen_cursor) IS res test.gen_cursor;
BEGIN
OPEN res FOR SELECT * FROM mytable;
cur := res;
END procdata;
/

CREATE OR REPLACE FUNCTION funcdata() RETURN test.gen_cursor) IS res test.gen_cursor;
BEGIN
OPEN res FOR SELECT * FROM mytable;
RETURN res;
END funcdata;
/

What is the proper way return data from a stored procedure to an ODBC client?
Is this really doable?
What I am trying to do is create a report, using Crystal Reports 8, from the stored procedure's result set.

You are in for an awful time here. I would write a program that presents a screen to collect the promts, call enad execute the procedure which writes the results to a temporary table then have Crystal read this. I have been in this spot before and this is what I did. Also, if your reports are multiuser you can have the ptrogram pass a number to be inserted in a column for your result set. Then add a prompt to the reports which will select only the records that have this matching number. BTW using stored procs. to view data is more trouble that it's worth.
hiving

James are you out there? Is this true? Does anyone know.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: Paula_Stankus_at_doh.state.fl.us

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Aug 06 2002 - 11:38:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US