database - Connection to MySQL issue -
i make connection between program in vb.net , sql database. code this:
public function connecter() dim connexion string = "server=197.28.178.33;database=test;uid=userid;pwd=xxxxxxxxxpassxxxx;" dim conn mysqlconnection = new mysqlconnection conn.connectionstring = connexion conn.open() return conn end function private sub form1_load(sender object, e eventargs) handles mybase.load dim lecteur mysqldatareader dim requete string connecter.close() connecter() requete = "select * article" dim commande new mysqlcommand(requete, connecter) lecteur = commande.executereader while lecteur.read combobox1.items.add(lecteur.getstring("description")) loop connecter.close() end sub but error appears:
an unhandled exception of type 'mysql.data.mysqlclient.mysqlexception' occurred in mysql.data.dll additional information: unable connect of specified mysql hosts.
what cause of error?
i don't understand problem , how can verify if communicate server? , how i'm sure server running
Comments
Post a Comment