Question

I need to create a class library in VB.NET that will connect to an Oracle database.

I would then be executing some functions to retrieve informations from a database.

I would then need to utilize this class in ASP.Net 2.0 project.

Would someone care to point me in the right direction in achieving this?

Thanks.

Was it helpful?

Solution

When I had to create a library just for dealing with database for the first time; I wasn't sure how to get started since I didn't know exact terminology to search for.

If you search for how to create "DAL" (Data Access Layer), you should be able to find out many many ways to achieve what you are looking for.

Usually DAL is independent of where it is being used so that you can use it in ASP.NET, or WinForms or WPF, etc. And also you can write DAL in a way that you don't have to worry about whether you are connecting to Oracle or other RDBMS.

Anyways, the keyword here is DAL

OTHER TIPS

You have two options; System.Data.OracleClient from Microsoft and ODP.NET. Personally, I prefer ODP.NET but System.Data.OracleClient will get the job done.

If you're familiar with connecting to other databases using ADO.NET, you will find that connecting to Oracle is no different -- Connection, Command, Reader, etc.

Basic ODP.NET Samples http://www.oracle.com/technology/sample_code/tech/windows/odpnet/odpbasic.html

This site gives a break down of how to build a connection string for the different providers you can use to connect to an oracle database.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top