Click here to Skip to main content
15,867,488 members
Articles / Web Development / ASP.NET
Article

Oracle Data Access Block for .NET

Rate me:
Please Sign up or sign in to vote.
3.50/5 (17 votes)
7 May 2006 72.8K   3K   32   13
This is an Oracle Data Layer class for connecting to Oracle Database from a .net application based on Oracle Data Provider.NET

Introduction

This is an Oracle Data Layer class for connecting to Oracle Database from a .NET application

Oracle Data Provider for .NET (ODP.NET) is an implementation of a data providerfor the Oracle database.ODP.NET uses Oracle native APIs to offer fast and reliable access to Oracle data andfeatures from any .NET application. ODP.NET also uses and inherits classes andinterfaces available in the Microsoft .NET Framework Class Library.based on Oracle Data Provider.NET.

This C# class file contains two classes OracleDataAcess and OracleDataAccessParameterCache. We can easily manage the application Business layer by using this class. Here I give the sample code of the implementation of DataLayer in the Business Layer.

C#
OracleParameter[] oraParam = new OracleParameter[2];


oraParam[0] = new OracleParameter("CustomerID", "100");
oraParam[1] = new OracleParameter("ResultCursor", OracleDbType.RefCursor);

oraParam[1].Direction = ParameterDirection.Output;

DataSet ObjDS =  OracleDataAccess.ExecuteDataset(connectionString, 
                 CommandType.StoredProcedure, 
                 "Pr_GetCustomerDetails",oraParam );

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Team Leader
India India
I am Rajesh Babu, currently working for Nous Infosystems, Bangalore. I have 6 plus years experience in Microsoft Technologies.

Comments and Discussions

 
QuestionRegarding Business and physical layers Pin
SUCHARITHASHARMA11-May-16 2:05
SUCHARITHASHARMA11-May-16 2:05 
GeneralReally Helpful Pin
Anurag Gandhi7-Aug-14 1:18
professionalAnurag Gandhi7-Aug-14 1:18 
GeneralMy vote of 4 Pin
rumicha26-Apr-11 10:37
rumicha26-Apr-11 10:37 
GeneralUse dispose method Pin
gskalra21-Mar-11 4:38
gskalra21-Mar-11 4:38 
GeneralMuchas gracias por el aporte!!! Pin
Edison Herrera Alvarez11-Sep-09 4:06
Edison Herrera Alvarez11-Sep-09 4:06 
GeneralExcellent, very good and very easy to use Pin
danteprax3-Feb-09 7:49
danteprax3-Feb-09 7:49 
Questionhow connect database Pin
Arindamchatterjee5-Aug-08 0:08
Arindamchatterjee5-Aug-08 0:08 
QuestionNile 3.0 Oracle Helper Vs your data access Pin
r_maiya4-Oct-07 7:26
r_maiya4-Oct-07 7:26 
QuestionHow I can Use this Pin
prasadtalla25-May-07 3:16
prasadtalla25-May-07 3:16 
Hi Rajesh,

I saw u r code but its names space is not accessiin in my another layer

please send a mail which name spaces i want to inclued in aspx page
prasad.talla@wipro.com

thanks and regards

prasad talla

AnswerRe: How I can Use this Pin
RB Changanacherry10-Jul-07 0:50
RB Changanacherry10-Jul-07 0:50 
GeneralExcellent Pin
Member 372533015-Jan-07 21:27
Member 372533015-Jan-07 21:27 
QuestionODP Pin
hedidin15-Jul-06 4:50
professionalhedidin15-Jul-06 4:50 
QuestionWhere's The Beef? Pin
Chris Meech8-May-06 2:23
Chris Meech8-May-06 2:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.