Open method: Connection unexpectedly terminated
Hey,
I have just installed MySql 5.0.15 and Connector/net 1.0.7.
I am using c# and am just trying to connect to a remote database. The user is valid and I can connect using the console with no problems. However the Open method is producing the exception 'Connection unexpectedly terminated'. My code is as follows:
MySqlConnection dbConn;
string sConnectionString;
sConnectionString = "Database=db;Data Source=host;User Id=abc;Password=abc";
dbConn = new MySqlConnection(sConnectionString);
try
{
dbConn.Open();
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
I originally was using the Odbc Drivers and it was working fine, but wanted to upgrade to use Connector/net.
Anybody have any ideas?? Please help!
Thanks in advance,
Anil
Subject
Written By
Posted
Open method: Connection unexpectedly terminated
December 30, 2005 10:27AM
September 08, 2006 03:28PM
February 03, 2006 07:49AM
December 15, 2006 10:17AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.