473,406 Members | 2,745 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,406 software developers and data experts.

Enterprise Library 2006 -- Calling Oracle Procedure with Parameters

Hello All,

I am completely stuck, I have tried for an entire day to get a simple
procedure call to my Oracle Db via the enterprise Library 06. I am not
an oracle fan to start, but have to deal with it for now. I am only
trying to retrieve data into a dataset from the oracle procedure,
nothing fancy! Here is my 100th version of code I have.
[ORACLE PROCEDURE I AM CALLING]

PROCEDURE "METLAB"."GET_LOOKUPS_PRC" (
"P_LOOKUP_TYPE" IN VARCHAR2, P_RETURNSET OUT SYS_REFCURSOR) IS

BEGIN

OPEN P_RETURNSET FOR

SELECT LOOKUP_ID,
LOOKUP_VALUE,
LOOKUP_TYPE
FROM MRLOOKUPS
WHERE LOOKUP_TYPE = P_LOOKUP_TYPE
ORDER BY LOOKUP_VALUE ASC;

NULL;

END "GET_LOOKUPS_PRC";
[code] [#01]
OracleDatabase db = new OracleDatabase(dbConn);
DbCommand objComm = db.GetStoredProcCommand("GET_LOOKUPS_PRC");

db.AddInParameter(objComm, "P_LOOKUP_TYPE",DbType.String,"NACE");
db.AddOutParameter(objComm, "P_RETURNSET",DbType.Object,8000);

objDS = db.ExecuteDataSet(objComm);
I would really like to continue writing the code similar to what I have
been doing with the Application Block previous. [HERE IS WHAT I AM USE
TO]
//Create Sql Parameters for SP
SqlParameter[] arrParms = new SqlParameter[3];
arrParms[0] = new SqlParameter("@p_UserName", arr[0]);
arrParms[1] = new SqlParameter("@p_DbId", arr[1]);
arrParms[2] = new SqlParameter("@p_AddRemove",
GetAddRemove(((CheckBox)sender).Checked));

//Update the records//
SqlHelper.ExecuteNonQuery(strConnection,
CommandType.StoredProcedure, "up_AddOrRemovePerms", arrParms);

[MY CLOSEST ATTEMPT FOR THE ORACLE SIDE OF IT .. STILL DOESN'T WORK]
[#02]
Dataset objDS = new Dataset;
OracleParameter[] arrParams = new OracleParameter[2];

arrParams[0] = new
OracleParameter("P_LOOKUP_TYPE",OracleType.VarChar ,50);
arrParams[1] = new OracleParameter("P_RETURNSET", OracleType.Cursor);
objDS = db.ExecuteDataSet("GET_LOOKUPS_PRC", arrParams);

THE ERROR FOR [#02]
"Object must implement IConvertible"

ANY DOCUMENTATION LINKS OR HELPFUL SOURCE CODE FOR ORACLE USING THE
ENTERPRISE LIBRARY WOULD BE MUCH APPRECIATED.

Thank in advanced!!
Spence

Aug 31 '06 #1
0 1389

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

Similar topics

0
by: stephane.traumat | last post by:
Hello, I already succeed to call a stored procedure in Oracle but only simple ones with one output value and several inputs. I don't any idea left so any help would be great :) Thanks But on...
1
by: Jason Leiser | last post by:
Is there a way to call an Oracle Procedure using the MS OLD DB Provider for Oracle object in a SQL Server 2000 DTS package? If it can't be done this way, is there another way to retrieve data from...
0
by: Error while executing SP | last post by:
Hi, I am getting an error while executing a sp from Oracle database. Can you let me know what could be the problem? here is the code using(System.Data.OleDb.OleDbConnection cn = new...
1
by: Mike Chamberlain | last post by:
Hi all. I'm trying to extend the Microsoft Enterprise Library Data Access Application Block (http://msdn.microsoft.com/library/en-us/dnpag2/html/daab.asp?frame=true) to work with a Borland...
2
by: Raj | last post by:
Hi, Does anybody know how to call an oracle stored procedure ( with parameters ofcourse) from MS Access 2002. I want to invoke an oracle stored procedure which takes 2 parameters. Thanks,...
2
by: ssp | last post by:
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:...
1
by: C#_Beginner | last post by:
I was wondering if someone can help me out. I'm getting the following error: Message: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'GET_RIGHTS2'...
3
by: Muhammad Intikhab Qaiser | last post by:
Hi I have following code and problem in calling the oracle stored procedure "DEPTREE_FILL" Here is the Code: Command.Connection = connection; ...
23
by: Gloops | last post by:
Hello everybody, Is anyone able to give me some indications about how to develop an Access interface for an Oracle database ? I dispose of Access 2003 (11.6566.8107) SP2, Oracle 9i 9.2.0.1.0...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.