Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Stored procedure as datasource in Crystal Report

Status
Not open for further replies.

bether

Programmer
Jan 3, 2007
28
US
I have the following as a stored procedure in Oracle:

CREATE OR REPLACE PROCEDURE DCAP.sp_GetRightsAndPrivileges
(p_privileges OUT SYS_REFCURSOR)
IS
BEGIN

OPEN p_privileges FOR

SELECT *
FROM bid_privilege;

END sp_getRightsAndPrivileges;

It compiles successfully and when you execute the proc using TOAD, it displays the result set correctly.

However, when I try to use the proc as a datasource for my Crystal Report in VS2005 (using Database Expert), I'm getting the following error:

Query Engine Error:
Source: OraOLEDB
Description: ORA-06550: line 1 column 7;
PLS-00306: wrong number or types of arguments in call to ‘SP_GETRIGHTSANDPRIVILEGE’
ORA-06550: line 1 column 7;
PL/SQL: Statement ignored
Native Error


I don't see anything wrong in the proc, but where should I look now? Any insights will be greatly appreciated.

Thanks.


 
Hi,
Maybe p_privileges needs to be explicitly declared in the Proc ( not just as a OUT object)




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Thanks. I tried, but it didnt work either. The proc didn't even compile.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top