Code:
cnn.ConnectionString = "server=ipaddress;userid=user;password=pass;database=aml;"
Dim numrows As Integer = 0
cnn.Open()
Dim Query2 As String = "select count(*) from aml.mlog where Mlogpageno='" & ComboBox1.Text & "'"
COMMAND = New MySql.Data.MySqlClient.MySqlCommand(Query2, cnn)
numrows = CInt(COMMAND.ExecuteScalar())
cnn.Close()
TextBox1.Text = numrows.ToString
If numrows = 0 Then
MessageBox.Show("Missing Logpage. Please Include the Bundle and Generate Logpage.")
ComboBox1.Focus()
Exit Sub
End If