I am trying to use a MS Access Database in an vb
I have written the following two queries.. but they are giving me errors which i am unable to fix.ANy help in this regard would be highly appreciated .
Query 1: Dim sSQL As String = "UPDATE AuthorTable" & _
" SET ID ='" & sID & "',Name = '" & sName & "',BookID ='" & sID & "',Date ='" & sDate & ""
It gives me the error: Syntax error in string in query expression '''.
I understand that there is probably a problem with the way I am ending the query. But I do not understand what would be the correct syntax. Please Help.
Dim sSQL As String = "SELECT COUNT(*)" & _
"FROM (" & _
"SELECT DISTINCT LastName" & _
" FROM Authors" & _
"WHERE Month = '" & sMonth & "' AND ID = '" & sID & "')"
Error: Operator '&' is not defined for string "SELECT COUNT(*)FROM (SELECT DIST" and type 'ListItem'.
Would really appreciate a quick response.