Click here to Skip to main content
15,886,110 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
What is wrong in below SQL query. I am getting error " Expect end of statment"


"UPDATE Sheet1 SET '"Date1&"' = '"&data1&"' Where Vertical = '" & Combo1.text & "'"
Posted

1 solution

Many things
1) Try UPDATE Sheet1 SET Date1 = '"& data1 & "' Where Vertical = '" & Combo1.text & "'"
2) Use command parameters[^]. Reason - read more about SQL Injection[^].
 
Share this answer
 
v2
Comments
OriginalGriff 6-May-15 5:04am    
He's "coding by guesswork" Abhinav! :laugh:

http://www.codeproject.com/Questions/988739/SQL-command-to-update-in-VB?arn=0
[no name] 6-May-15 5:05am    
Good answer Abhinav S +5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900