Please send us a test project. You may do it via our Contact form:
http://www.devart.com/company/contact.html
We are unable to reproduce the issue.
dotConnect getting confused between multiple oracle homes
Re: dotConnect getting confused between multiple oracle homes
I think there is no problem at all. But please review the codes first. I think that probably you have a error in some punctuations or spaces.Simon C wrote:If you run the following code on a computer with two or more oracle homes installed, the second connection fails as it cannot resolve the connection identifier - it seems it's getting confused between the two oracle homes. This is using dotConnect 5.35.57.0. What am I doing wrong here?
Code: Select all
IList homes = OracleConnection.Homes; OracleHome home1 = (OracleHome)homes[0]; OracleHome home2 = (OracleHome)homes[1]; string db1 = home1.GetServerList()[0]; string db2 = home2.GetServerList()[0]; using (OracleConnection db1Conn = new OracleConnection {Home = home1.Name, Server = db1, UserId = "xxxx", Password = "xxxx"}) { db1Conn.Open(); } using (OracleConnection db2Conn = new OracleConnection {Home = home2.Name, Server = db2, UserId = "xxxx", Password = "xxxx"}) { db2Conn.Open(); }
-
- Posts: 5
- Joined: Wed 24 Nov 2010 14:52
I' having the same problem with dotConnect 6.0.58.
After assigning a home to a OracleConnection instance all other instances will use that same home, even if you assign a differen home to them.
for example:
but if you try just the second home it will succeed.
After assigning a home to a OracleConnection instance all other instances will use that same home, even if you assign a differen home to them.
for example:
Code: Select all
using (OracleConnection db1Conn = new OracleConnection {Home = "OraClient11g_home1", Server = db1, UserId = "xxxx", Password = "xxxx"}) {
try { db1Conn.Open();}
catch { //This will fail because db1 is not available for home1 }
}
using (OracleConnection db2Conn = new OracleConnection {Home = "OraClient11g_home2", Server = db1, UserId = "xxxx", Password = "xxxx"}) {
try {db2Conn.Open();}
catch { //This should work but does also fail }
}
Code: Select all
using (OracleConnection db2Conn = new OracleConnection {Home = "OraClient11g_home2", Server = db1, UserId = "xxxx", Password = "xxxx"}) {
try {db2Conn.Open();} //This works
catch { }
}
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
-
- Devart Team
- Posts: 1710
- Joined: Thu 03 Dec 2009 10:48
We have analyzed the situation, the problem appears to be caused by an error in the Oracle Client 11g implementation. The problem is that the oci.dll assembly of the client uses TNS names of the client that was already used instead of loading its own TNS names.
We can only recommend you to address this issue to the Oracle support.
We can only recommend you to address this issue to the Oracle support.