ODP.net is oracle’s data provider for .net. I have been using it now for almost 3 year and I absolutely enjoy how tightly integrated it is with Microsoft. Yes you can use Microsoft’s oracle data provider but you will not get all the bell and whistles that you will get with ODP.net. In this article we will be looking at how to leverage ODP.net to retrieve data from the database and use it in a web service.
Prerequisites – A basic VB understanding, otherwise you can pick it up as you go along. You should also have and oracle express database instance installed. If you do not have the database go here to download the database and if you dont have the oracle tools install you can get those from here.
I will be using Visual Studio 2010 as my development tool but you can use visual Studio 2005 on forth and it will work.
To start lets create a web service.
1.Go to file->new Web Site -> ASP.NET Web Service
You should now be looking at a screen that looks like this.
Now we need to make all of our references to the odp.net DLL’s. Right click the project and choose “Add Reference”
And thats it! you are now ready to start sending commands to the oracle database of your choice.
In my next arcticle I’ll show you how to call a procedure, function , or just do simple sql statements against the oracle database using ODP.net