-
Oracle connection error
Hi,
I am trying to connect to an oracle database using code from my .net application, but I keep getting the error "TNS cannot resolve service name". I can connect to the database using all my other tools and the .net ide even connects to the database using the server tool bar. The connection string I am using is
"Data Source=[tns];user id=[user];password=[pword]"
where [tns] is the tns name; [user] is the user name and [pword] is the password.
I thought it was just my connection string that was incorrect, but then I tried using the OO4O objects which dont use connection strings and this returns the same error. If I run the same code from vb6, it connects no problem.....
HELP PLEASE!
-
Ok guys.... After much frustration, I found the solution. Your application can not be running from a folder path that contains the round brackes "()". For some reason, those guys cause a problem when you try to connect to Oracle.
Real weird!! This doesnt happen when connecting from VB6. It only happens from .NET, even if you are using COM objects for db connection.
-
I get the same thing. How strange. Thanks for the heads up.