ERROR [23000] [MySQL][ODBC 3.51 Driver][mysqld-5.0.41-community-nt]You have an error in your SQL syntax;
I seem to only have a problem with a certain column in this table....but then again i could be doing something wrong....
ERROR [23000] [MySQL][ODBC 3.51 Driver][mysqld-5.0.41-community-nt]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc FROM remedy WHERE name='Clearisil 3'' at line 1
is there anything wrong with that syntax?? i have tried
'desc FROM remedy WHERE name='Clearisil 3'' and
'desc FROM remedy WHERE name=Clearisil 3'
both of those do not work
this is my code
Dim queryString As String = "SELECT desc FROM remedy WHERE name='" + RemedyBoxLeft.SelectedItem.Text + "'"
Dim connectionstring As String = "driver=MySQL ODBC 3.51 Driver;server=192.168.1.76;uid=root;pwd=pwd;database=database"
Using connection As New OdbcConnection(connectionstring)
Dim command As New OdbcCommand(queryString, connection)
connection.Open()
Dim reader As OdbcDataReader = command.ExecuteReader()
While reader.Read()
TextBoxLeft.Text = reader("desc").ToString
End While
' Call Close when done reading.
reader.Close()
End Using
the error occurs at
Dim reader As OdbcDataReader = command.ExecuteReader()
anyone know??