SQL syntax error in Update statement VB.net
- by Shane Fagan
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?