I am working on a application in Visual C# 2010.
I've been trying to connect to my MySql Database that I have located on another machine on my network.
The database is setup properly as I have other web apps that use it but they are located on the server machine.
But like I said I"m having difficulty getting connected.
The code used to connect:
//Initilize DataSource Variable
string DataSource;
//Construct the Database connection string
DataSource = "Data Source=" + DbHost + ";Port=" + DbPort + ";Database=" + DbName + ";User ID=" + DbUser + ";Password=" + DbPass + ";";
//Create Connection Object
MySqlConnection MySqlCon = new MySqlConnection(DataSource);
try
{
MySqlCon.Open();
}
catch
{
return false;
}
return true;
I've been giving my domain name in this format:
mydomain.com
i've specified port and my ports are open
I just can't crack it..sigh
Any suggestions are most welcome thanks.

New Topic/Question
Reply




MultiQuote




|