Im having trouble getting an SQL update to work. It keeps on saying 'Syntax error in UPDATE statement'. I cant seem to see anything wrong with my code, so i think i need someone else to see it. heres the code thats not working
any help would be appreciated. I cant get any more done on this until i have this problem solved.
Code:
conn.BeginTrans
Dim Sql As String
Sql = "UPDATE Quotes SET Date = '" & txtDate.Value & "' " & _
", QuoteType = " & opgQuoteType.Value
If Not IsNull(txtDescription.Value) Then
Sql = Sql & ", Description = '" & _
txtDescription.Value & "' "
Else
Sql = Sql & ", Description = ' ' "
End If
Sql = Sql & " WHERE QuoteID = " & QuoteID & ";"
MsgBox Sql
conn.Execute Sql
conn.CommitTrans
any help would be appreciated. I cant get any more done on this until i have this problem solved.