wrote:
Dim strUpdate As String = ("UPDATE tblArtikujt SET [Grupi]=" & TextBox2.Text & ", [Pershkrimi]=" & TextBox3.Text & ", [Cmimi]=" & TextBox4.Text & ", WHERE [Id]=" & ida & "")
The above is the query used. The error i found is a comma before where clause.
Dim strUpdate As String = ("UPDATE tblArtikujt SET [Grupi]=" &
TextBox2.Text & ", [Pershkrimi]=" & TextBox3.Text & ",
[Cmimi]=" & TextBox4.Text & " WHERE [Id]=" & ida & "")
It should work.
In case there is still a Issue, follow the
Christian advice:
Christian wrote:
When your SQL won't work, a good first step, is to get the string out of the debugger, and put it directly into the Management Console, to get a better error message. If you put single quotes around your strings, your code will probably work, but it will still be illegible, not secure, and prone to break if users use single quotes in the text they enter.