473,382 Members | 1,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Oracle Stored Procedures with Enterprise Library June 2005 Version

ssp
Hello there,

I am trying to do very simple thing in trying to return results from an
Oracle (10g) Stored Procedure using the Enterprise Library June 2005
Version.

The stored procedure first:
============================================
CREATE OR REPLACE PROCEDURE AGENCYSELECTALL(p_cursor OUT
SelectPackage.SelectCursor)
as
begin
open p_cursor for select * from sa.agency;
end AGENCYSELECTALL;
/
============================================

The cursor is defined in a package called SelectPackage as
===========================================
CREATE OR REPLACE PACKAGE SelectPackage AS

TYPE SelectCursor IS REF CURSOR;

END SelectPackage;
/
============================================

The code for executing the stored procedure looks a like this:
============================================
public AgencyEntityCollection SelectAll()
{
DBCommandWrapper dbCommandWrapper =
this.Db.GetStoredProcCommandWrapper("AGENCYSELECTA LL");

OracleParameter prms = new OracleParameter();

prms = new OracleParameter("P_CURSOR", OracleType.Cursor, 30000,
ParameterDirection.Output, Convert.ToBoolean(1), 0, 0, "",
DataRowVersion.Default, null);

dbCommandWrapper.AddOutParameter(prms.ParameterNam e, prms.DbType,
prms.Size);
return
(AgencyEntityCollection)this.ExecuteSPMultiple(typ eof(AgencyEntityCollection),
typeof(AgencyEntity), dbCommandWrapper);
}
============================================

Now, everytime I run this, I get the error:
============================================
Message: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to
'AGENCYSELECTALL'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
============================================

Could anyone shed some light, as to what I maybe doing wrong?

Thanks

Nov 3 '06 #1
2 4901
Try to stick to ANSI SQL than PL/SQL for your Oracle is safe. Make sure you
do not have 2 version of Oracle in your machine.

chanmm

"ssp" <sa****@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
Hello there,

I am trying to do very simple thing in trying to return results from an
Oracle (10g) Stored Procedure using the Enterprise Library June 2005
Version.

The stored procedure first:
============================================
CREATE OR REPLACE PROCEDURE AGENCYSELECTALL(p_cursor OUT
SelectPackage.SelectCursor)
as
begin
open p_cursor for select * from sa.agency;
end AGENCYSELECTALL;
/
============================================

The cursor is defined in a package called SelectPackage as
===========================================
CREATE OR REPLACE PACKAGE SelectPackage AS

TYPE SelectCursor IS REF CURSOR;

END SelectPackage;
/
============================================

The code for executing the stored procedure looks a like this:
============================================
public AgencyEntityCollection SelectAll()
{
DBCommandWrapper dbCommandWrapper =
this.Db.GetStoredProcCommandWrapper("AGENCYSELECTA LL");

OracleParameter prms = new OracleParameter();

prms = new OracleParameter("P_CURSOR", OracleType.Cursor, 30000,
ParameterDirection.Output, Convert.ToBoolean(1), 0, 0, "",
DataRowVersion.Default, null);

dbCommandWrapper.AddOutParameter(prms.ParameterNam e, prms.DbType,
prms.Size);
return
(AgencyEntityCollection)this.ExecuteSPMultiple(typ eof(AgencyEntityCollection),
typeof(AgencyEntity), dbCommandWrapper);
}
============================================

Now, everytime I run this, I get the error:
============================================
Message: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to
'AGENCYSELECTALL'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
============================================

Could anyone shed some light, as to what I maybe doing wrong?

Thanks

Nov 3 '06 #2
ssp
The oracle stored procedure works fine. I am still experimenting with
trying to read results into my form.

chanmm wrote:
Try to stick to ANSI SQL than PL/SQL for your Oracle is safe. Make sure you
do not have 2 version of Oracle in your machine.

chanmm

"ssp" <sa****@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
Hello there,
Nov 5 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Suresh Tri | last post by:
Hi all, I am interested in extracting the class or jar files which are stored as java stored procedures in Oracle. But I want to know if these are stored as references to external files in...
1
by: Suresh Tri | last post by:
Hi all, I am in search of any Enterprise level Opensource Project that uses Java Stored Procedures supported by Oracle. I could not find any by googling. Can any one plese point me to any such...
1
by: Chandra Mohan | last post by:
Hi, We need help on following things, 1. Inputs on creating comments on the columns & Tables of a SQL Database & generating the sql script of that. 2. Is it possible to call a .exe file in...
7
by: Douglas Buchanan | last post by:
I can't seem to open SQLS2k Stored Procedures in the IDE I am running MDE 2003 Version 7.1.3088 I have a MSDN professional subscription and did a complete install of vs.net Help explains how...
11
by: jrefactors | last post by:
I want to know the differences between SQL Server 2000 stored procedures and oracle stored procedures? Do they have different syntax? The concept should be the same that the stored procedures...
0
by: Mythran | last post by:
I have installed NDoc and VSHIK2003. If I install a clean Enterprise Library June 2005, how can I go about getting the exact same documentation that is installed with the release (in the...
42
by: Paul | last post by:
Anyone know where I can find some good resources to help us choose between SQL and Oracle ( Progress Openedge as well ) . Any comments on what you would choose ?? We are creating a new Warehouse...
6
by: hegyvari | last post by:
Hi, I have a few apps written in PHP, running on Fedora Core. After porting these applications from PostgreSQL to Oracle a bug appeared: sometimes, not in a reproducable manner, the web page...
1
by: GaryDean | last post by:
I now have installed (from the same install) Enterprise Library - January 2006 and Enterprise Library - June 2005. The install for these two was called Enterprise Library for .Net 2.0. (not...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.