Are the connection to oracle 9i and 10g different?

Are the connection to oracle 9i and 10g different?

Postby june » Thu 14 Jul 2005 20:11

I am new to this software, just testing the connection to Oracle from C# code.

OracleConnection Connection = new OracleConnection(";User Id=user1;Sid=dev;Password=xxx;Direct=True");

OracleConnection Connection = new OracleConnection("User ID=user1; Password=xxx; Data Source=dev");

connection string A works for oracle 9i, but not for 10g, got invalid SID error. But connection string B works for 10g with same SID.

My question is what is the difference between above two connection strings? Is it possible B uses oracle_net (tnsname.ora) instead of oraDriect since I have them both installed on my machine.

Thank you very much for you reply!

Postby Paul » Fri 15 Jul 2005 07:08

In B you are connecting using Oracle client and tnsname.ora.
In A you are connecting without Oracle client and tnsname.ora.
OraDirect is a data provider that helps you to write .Net applications with access to Oracle.
Please note that SID and Data Source are different values. Please take SID from tnsname.ora as described in "Using Direct Mode" topic in OraDirect .Net documentation
Posts: 725
Joined: Thu 28 Oct 2004 14:06

Return to dotConnect for Oracle