DataSource when using System.Data.OracleClient

H

hayes.seamus

Hi,
I am trying to connect a c# application to an Oracle 10i database.
I have not worked with Oracle before.

When using System.Data.OracleClient, willthe DataSource in the
connection string point to a DSN on the client machine, or does it need
to point to an Oracle Client configuration file?

Any help would be much appreciated.

Thanks...
 
G

Gregory Silvano

The last ASP.NET / Oracle project I worked on had a connection string like
this:

"Data Source=DB_NAME;User ID=USER;Password=PWD;"

Where DB_NAME was an entry in tnsnames.ora on the server and development
machine.

--
Regards,

Gregory Silvano
Stature Software, LLC
http://www.staturesoftware.com
 
B

Bill Block

You can use a connection string in your application without needing a
DSN configured on the client machine. You do, however, need to have
the Oracle client software installed on the client machine in order to
connect to an Oracle database.

Below is a sample connection string:

"server=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=255.255.255.0)(PORT=1521)))(CONNECT_DATA=(SID=oracle_sid_here)))"


Here's a link to the current Oracle client software:

http://www.oracle.com/technology/software/tech/oci/instantclient/index.html

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top