From a CSharp program I would like to connect to an OracleDatabase
with thefollowing code:
using Oracle.DataAccess.Client;
using Oracle.DataAccess.Types;
....
string connectionstring = "User Id=peterm;Password=mypasswd;Data Source=XE;";
OracleConnection connection = new OracleConnection(connectionstring);
connection.Open();
In the Open() command I am getting an erro back:
ORA-12532 TNS invalid argument.
Why ?
I am absolute sure that I entered the correct login name and password.
So it must be either the Data Source argument or the syntax of the conntionstring.
I am using the Oracle Express version and the default database name is "XE".
So what else can be the error ?
When I define an ODBC Data Source TestOracle and connect with the following string:
string connectionstring = "User Id=peterm;Password=mypasswd;Data Source=TestOracle;";
I am getting an "ORA-12154 TNS connect could not resolved".
What's wrong with this ?
Wolfgang