By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,831 Members | 1,031 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,831 IT Pros & Developers. It's quick & easy.

How to connect to Oracle database ?

P: n/a
Hi,
I'm an Oracle newbie. I've just created a table in Oracle with CREATE TABLE.
Now, in C#, how to connect to database and get my table ?
Thanks

Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi,

I am not sure a managed Oracle provider for ADO .NET exists, so you will
most likely need the OLEDB provider for Oracle installed on your client
computer, and you will be able to connect to your database like to any other
OLEDB data source.

You can create an empty file named, say, test_oracle.udl in Notepad and save
it.
Then, double-click on this file in Windows Explorer and configure a
connection to your Oracle database with the wizard appeared (make sure that
the connection works with the Test Connection button). Of course, you will
need the name of the database server, name of the database and probably some
other parameters (I have very little experience with Oracle so I cannot say
for sure). Then, open the UDL file again in Notepad and what you will see
below the section name enclosed with [] is a ready to use connection
string.

Then, configure an instance of OleDbConnection with this connection string
and hopefully it should work.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Unit Testing and Integration Environment
http://x-unity.miik.com.ua
Deliver reliable .NET software

" Hai Ly Hoang (MT00KSTN)" <Re**********@Mail.com> wrote in message
news:#H*************@tk2msftngp13.phx.gbl...
Hi,
I'm an Oracle newbie. I've just created a table in Oracle with CREATE TABLE. Now, in C#, how to connect to database and get my table ?
Thanks



Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.