SQL syntax error in Update statement VB.net

Posted by Shane Fagan on Stack Overflow See other posts from Stack Overflow or by Shane Fagan
Published on 2010-03-12T15:11:23Z Indexed on 2010/03/12 15:17 UTC
Read the original article Hit count: 246

Filed under:
|
|
|
|

Hi, Im getting a strange syntax error when I run this in VB

        SQLString = "UPDATE Login SET Password = '" + PasswordTextBox.Text + "'"
        SQLString += " WHERE UserName = '" + UserNameTextBox.Text + "'"

The Username is checked before getting to this part and is definitly in the db. It gives an exception saying syntax error in update statement. Anyone have any ideas whats wrong?

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about sql