views:

186

answers:

4

Hello,

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 error "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

A: 

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.

sha
Yes, I have both 32bits version of the libraries. As you guess, I'm on a 32 bits machine.
Gabriel Mongeon
A: 

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;
James L
No, it's in there, I'm using the same TNSNAMES.ORA as one of my colleague, the only difference is that he do not have the ODP.Net 9.2
Gabriel Mongeon
Do a search for TNSNAMES.ORA. You probably have more than one Oracle Home, and hence more then one TNSNAMES file. If you can, you are best to avoid TNSNAMES
James L
A: 

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!

Gabriel Mongeon
A: 

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

John Banks
The application runs fine, but if I try to use any wizard from the visual studio IDE, it will fail
Gabriel Mongeon