CSharp with oracle database

image credit:flickr.com

CSharp with Oracle Database

Using CSharp with Oracle Database has many advantages if we know about the features of Oracle database management system
Oracle is the high performing RDBMS system. It can be scaled down, applied security constraints to, working on multiple(clustered) servers as well as single-servers using Windows, Linux, and UNIX etc.
The platform independent features make this one leading the top most position in the world of databases.
It handles transaction processing, business intelligence, and content management applications with great ease in a strictly secure environment.
The newest Oracle Database 12c has the ability to handle the databases even over varieties of cloud data storages as well. The in-memory data processing feature makes it performance rich. Oracle Database 12c comes in three editions to fit your business needs and budget: Enterprise Edition, Standard Edition, and Standard Edition One.

Oracle vs Sql Server and MySql

oracle features

Using Oracle with CSharp with Oracle Client

Oracle client library is a class library (DLL) that connects us to the Oracle database. A client is a .Net data provider.
Since we have multiple data providers so we have to make sure which one is needed.

The System.Data.OracleClient is now deprecated but there is Oracle.Data.Client, which is actually the best ever built Oracle Client, or Oracle .NET Data Provider. It is easily downloadable from here
So, when accessing the Oracle underlying database, make sure your work with this provider, proper for your version of Oracle, and start doing ADO.NET with your favorite database

There are also some other tools that you can work with that will ease your data access code pain, such as Enterprise Library or NHibernate, both are frameworks to basically accessing databases.

Enterprise Library can do even more then that!

And NHibernate is an ORM (Object/Relation Mapping) tool that can work just very fine with Oracle.

Remember though, always use Oracle.Data.Client namespace in the Oracle.DataAccess.dll assembly.

Here is a simple program

using System.Data.OracleClient;

string conStr= “myCon”;
using (OracleConnection con= new OracleConnection(conStr))
using(OracleCommand cmd = new OracleCommand(“Select * from tbl_Example”))
cmd.Connection = con;

Syed Adeel Ahmed
Analyst, Programmer, Educationist and Blogger at Technofranchise
Computer Systems Engineer from Sir Syed University Of Engineering & Technology.I am passionate about all types of programming.
Syed Adeel Ahmed on FacebookSyed Adeel Ahmed on GoogleSyed Adeel Ahmed on InstagramSyed Adeel Ahmed on Twitter

Published by

Syed Adeel Ahmed

Computer Systems Engineer from Sir Syed University Of Engineering & Technology.I am passionate about all types of programming.