Help with "ORA-06413: Connection not open"
874035Jul 7 2011 — edited Jul 9 2012Hi there,
I'm trying to connect to an Oracle database through my asp.NET application (this is my 1st attempt ever), but I keep getting the error "ORA-06413: Connection not open" when I do the following:
private void OpenConnection()
{
CloseConnection();
mCn = new OracleConnection(mstrCN);
mCn.ConnectionString = Connection.ReturnConnectionString();
try
{
mCn.Open();
}
catch (Exception ex)
{
}
}
My connection string uses the following format:
public static string ReturnConnectionString()
{
return "Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=ipaddress)(PORT=1521)))(CONNECT_DATA=(SID=sampleSID)));User Id=sampleUsername;password=samplePwd; Max Pool Size=100000";
}
I've done some research regarding this error and apparently some people are facing this issue when there a special character (like parenthesis) in the path, but my project's path does not include any...
I know that the SID, ip address and login credentials are correct as I'm able to connect to the DB using sql developer client.
Any ideas?
Thanks
Edited by: 871032 on Jul 7, 2011 12:52 PM