End Google Ads 201810 - BS.net 01 --> Hello Friend
I am connectin Mysql in vb.net2008 on vista then its give error(Unable to connect to any of the specified MySQL hosts.) but whene i conectthis on xp os then its excute .... {}

My Code-

MySqlConnection _MySqlConnection;
MySqlCommand _MySqlCommand;
MySqlDataAdapter _MySqlDataAdapter;
string _Conentionstring = "server=localhost;database=schoolinventory;user id=root;password=;";
public int GetId()
{
try
{
_MySqlConnection = new MySqlConnection(_Conentionstring);
_MySqlConnection.Open();
string _Adpstring = "select Count(*) from goods";
_MySqlDataAdapter = new MySqlDataAdapter(_Adpstring, _Conentionstring);
DataSet _ds=new DataSet();
_MySqlDataAdapter.Fill(_ds);
int i = Convert.ToInt32( _ds.Tables[0].Rows[0].ItemArray[0].ToString());
return 0;
}
catch (Exception ex)
{
return 0;
}
}
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
Eventure Technology
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com