-1

first picture i dont know why i keep getting this error i have no idea how to fix it...either i get this error or invalid column name -_- enter image description here the invalid column error i get only on the item 'tosai'

this is the coding i used ...checked it multiple time with my notes and i dont see anything wrong here i must be missing something out but i have no idea what is it

3
  • It's always nice to have a "debug" mode where you will print the SQL command. That way, you can easilly see what is wrong with it. Commented Apr 15, 2020 at 13:23
  • Hi and welcome to the forum! Please don't post screenshots for the reasons outlined in this link! Also, re. your problem, could you please print out the actual SQL string that you are sending to the server - that way, we can be of better service!
    – Vérace
    Commented Apr 15, 2020 at 14:09
  • what do you mean by print out the SQL string?you mean copy paste the code here?
    – hunter
    Commented Apr 15, 2020 at 14:14

1 Answer 1

0

You need to enclose condition in ' and '. ( Sql Syntax)

delete from [Food] where [Food List] = 'Potato'
3
  • it removed the error but its not removing the data...when i debug and click delete it show data deleted but its still on the table
    – hunter
    Commented Apr 15, 2020 at 13:26
  • not a expert on VB, but maybe you need to close the resource in End of Try not in catch
    – Masoud R
    Commented Apr 15, 2020 at 13:37
  • didnt work....sigh vb is hard -_-
    – hunter
    Commented Apr 15, 2020 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.