Home All Groups Group Topic Archive Search About

DataSource when using System.Data.OracleClient

Author
14 Nov 2006 4:53 PM
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...

Author
14 Nov 2006 7:33 PM
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


<hayes.sea***@gmail.com> wrote in message
Show quote
news:1163523206.388621.237050@e3g2000cwe.googlegroups.com...
> 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...
>
Author
14 Nov 2006 7:33 PM
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

AddThis Social Bookmark Button