Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connect to Oracle using SystemDNS?

Status
Not open for further replies.

gdrenfrew

Programmer
Aug 1, 2002
227
GB
Hello,

I've trawled the forums but haven't been able to find an answer.

I'm trying to connect my C# windows app to an Oracle database.

Is it possible to connect to an Oracle database without having the Oracle Client software installed on the client PC?

If I use System.Data.OracleClient, as I understand it, I need to use the client's TNSNAMES.ora to connect to the database. This connection string works ok: OracleConnection oraConn = new OracleConnection("Data Source=TRINITY_UAT1.SMG;User ID=system;Password=trinity;");
but I'd prefer not to install Oracle Client on the machine that will eventually host my app.

I'm having trouble connecting with odbc. eg,
System.Data.Odbc.OdbcConnection("Provider=MSDASQL.1;Data Source=Trinity_UAT1;User ID=system;Password=xxxx;");
gives me the error ERROR IM0002 Data source name not found an no default driver specified

I can extract the connection from the SystemDNS on the client - is it possible to use this information to connect to the Oracle database?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top