I am getting an error when connecting to MySQL database. For some reason I cannot gain access to my database. I have used similar code to connect to another database on another server in a previous application but cannot do it for this one. Is it a configuration issue or a code issue? If so what changes do I need to make. I am using cPanel and phpMyAdmin. Thanks!
Here is my code :
Dim dr As MySqlDataReader Dim cmd As MySqlCommand conn = New MySqlConnection("Server=IPADDRESS;Port=3306;Database=DATABASENAME;Uid=USERID;Pwd=PASSWORD;") conn.Open() cmd = New MySqlCommand("SELECT FIELD FROM TABLE WHERE FIELD= '" & VALUE & "'", conn) dr = cmd.ExecuteReader() If dr.HasRows = True Then While dr.Read = True End While End If