I have a C# program that uses System.Data.OracleClient to access an oracle database.
The code uses OracleCommand, OracleDataReader objects. And it uses the TNS names to refer to specific oracle servers (as defined in the tnsnames.ora file).
It runs fine on my computer. And then I copied the binary to another computer, and upon running it encounters the error:
TNS:could not resolve the connect identifier specified.
The other computer has the same version of oracle client installed, and the identical copy of tnsnames.ora dropped in the oracle network/admin folder. And the other computer also has SQLDeveloper installed, and I am able to connect to the oracle servers by using those TNS names from inside its SQLDeveloper.
Why then is the c# program complaining about not able to resolve TNS identifier?
The connection string I use (as hardcoded into my c# program) is ;
"Data Source=TNS Name; User ID=user; Password=pass;"
Thanks