in SSRS 2005 calling an Oracle stored procedure keep getting an error 'Number or Type don't match
I have an SSRS 2005 report. I had to modify it to add passing a number to an Oracle Stored Procedure/Package.
When I run a test in the Data tab, I get data back. When I try in in the Preview tab, I get an Oracle error that the number or type of parameters don't match. I have tried multiple different data types, but nothing seems to work.
the Oracle Definitions are:
create or replace
PACKAGE user_salescap_pkg_hrf AS
type ref_cursor is REF CURSOR;
PROCEDURE user_salecap_getdata_hrf(weekendate_in in DATE, week in NUMBER, sc_cursor in out ref_cursor);
END user_salescap_pkg_hrf;
---------------
--------
---------------
create or replace
PACKAGE BODY USER_SALESCAP_PKG_hrf as
PROCEDURE user_salecap_getdata_hrf(weekendate_in in DATE, week in NUMBER, sc_cursor in out ref_cursor) as
In SSRS week is definted as:
integer, and Available Values are 0-5.
I would include a screen shot if needed.
Weekendate_in is defined as a Datetime data type.
August 21st, 2012 2:11pm
The problems is that your procedure requires 3 parameters. I would bet that you only provide 2 currently.
I really don't think it is possible to put a cursor as a parameter in ssrs though.
Alex
Free Windows Admin Tool Kit Click here and download it now
August 21st, 2012 4:02pm
To me that is part of the mystery of SSRS and Oracle. The ref_cursor was already set up that way and worked. I can't see what SSRS is actually sending over to Oracle. I don't see anywhere in SSRS where you set up the Cursor reference.
Henry Faust
August 21st, 2012 5:11pm
Your question actually got me curious, and here is what I found! A post from Bin Long here on msdn!
When using the built-in Oracle data extension, Reporting Services uses System.Data.OracleClient to try to execute the query/stored procedure. Oracle REF cursors require special handling at runtime (Please see Oracle REF cursor section in
http://msdn2.microsoft.com/en-us/library/haa3afyz(vs.71).aspx).
For more information, please see:
How to use Reporting Services to configure and to access an Oracle data source:
http://support.microsoft.com/default.aspx?scid=kb;en-us;834305
Passing parameters to Oracle stored procedure:
http://qa.social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/fa439139-e8a4-4fd0-8045-1b4700d40bd5
Hope this helps!
Alex
Free Windows Admin Tool Kit Click here and download it now
August 22nd, 2012 10:58am