Dim conn As MySqlConnection
conn = New MySqlConnection()
conn.ConnectionString = "Server=localhost;User Id=root;Passsword=;Database=voting "
Try
conn.Open()
Catch myerror As MySqlException
MsgBox("error")
End Try
Dim myAdapter As New MySqlDataAdapter
Dim myCommand As New MySqlCommand()
myCommand.Connection = conn
myAdapter.SelectCommand = myCommand
If Textuser.Text = "" And Textpass.Text = "" Then
MsgBox("invalid")
ElseIf myCommand.CommandText = "SELECT * FROM tbl_elemvoters WHERE Username = '" + Textuser.Text + "' AND VoterID='" + Textpass.Text + "UPDATE Voted='" + "Yes"
Form2.Show()
Me.Hide()

Jignesh TrivediRank #16 · 50.3K reputationPosted Jul 15, 2013, 7:21 PM EDT
hi,
are you facing any problem or getting any error?
your command text has syntext error; missing "AND"
myCommand.CommandText = "SELECT * FROM tbl_elemvoters WHERE Username = '" + Textuser.Text + "' AND VoterID='" + Textpass.Text + "' AND UPDATE Voted='" + "Yes'"
Pankaj PandeyRank #642 · 3.7K reputationPosted Jul 15, 2013, 9:22 PM EDT
what the issue you are facing here?