开发者

ODP.Net 9.2 and 11 on the same machine, using VS2008

I'm currently developping to application, one using the ODP.Net 9.2 and the other one should use the ODP.Net 11. I'm using the Server Explorer from VS2008 to add a new connection but failed each time with the err开发者_开发知识库or "ORA-12154: TNS: Could not resolve the connect identifier specified". I'm not able to debug which ODP VS2008 is using. Does someone has run into this kind of problems?

I'm using ODP.net 9.2 and 11, with Visual Studio 2008 on a Windows XP SP3 machine.

Thank you


This means your connection is missing from TNSNAMES.ORA. It's easier to use a TNS-less connection string... something like this:

Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;


Finally, I went into the C:\windows\assembly and remove the 9.2 Oracle.dataAccess from the GAC. Not really what I was hoping for a solution, but at least its work for now.

Thank you James and Sha!


Do you have correct version of 9.2 and 11 libraries? I mean 32bit vs 64bits? I used both of them on my machine abut you have to be careful about using proper bits version.


Copy the 9.2 Oracle.dataAccess.dll to your bin directory of the application.


I guess this is a bug submitted to Oracle.

Create a UDL connection file for the oracle tns and try again in solution explorer. Now, everything should work fine.

1) Desktop -> Create test.udl file -> choose "Oracle Provider for OLEDB" -> click next -> in datasource provide the tnsname -> provide authentication credential -> hit "test connection" -> you should see connection succeeded. 2) Now with above step completed, you can easily connect to oracle DBs from you visual studio's "Server Explorer".

GOOD LUCK.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜