I tried to connect to an existing Oracle Database with the following ConnectionString:
using System.Data.OracleClient; // + Added Reference "System.Data.OracleClient"
string cs = "Data Source=XE;User Id=karl;Password=mypasswd";
connection = new OracleConnection(cs);
connection.Open();
This code yields an "Invalid argument" ORA-12532 error.
Why ?
Even when I switch to
using Oracle.DataAccess.Client; // + Added Reference "Oracle.DataAccess"
I got the same error.
"XE" is the name of the Oracle Express Database.
What else can I do ?
Does the sequence of Data Source, User Id and Password in the connection string matter ?
Do I have to declare the "Data Source" somewhere else (beside the Reference)?
Werner