Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click ListBox1.Items.Clear()
sql = "SELECT * FROM testing_mysql_vb"
Try
dbcomm = New MySqlCommand(sql, dbconn)
dbread = dbcomm.ExecuteReader()
While dbread.Read
ListBox1.Items.Add(dbread("product_name")("product_quantity"))
End While
dbread.Close()
Catch ex As Exception
MsgBox("Error in collecting data from Database. Error is :" & ex.Message)
dbread.Close()
Exit Sub
End Try
End Sub
End Class
i can't get the data from my database
it says error in conversion from string to integer