Im trying to update a sql database field with a string value. Im getting a wierd error saying "Invalid column name NO". The field that Im trying to update is just simply the value out of a dropdownlist, and the two values are yes and no. Here is my update statement.
I know that the variable "judgement" is holding the correct value, what could be causeing my error?
Code:
Dim sqlcommand As New SqlCommand
Dim judgement As String = ddlLegal.SelectedValue
sqlcommand.Connection = connPayables
sqlcommand.CommandText = "UPDATE ClientInfo SET OutJudgements = " & judgement & " WHERE LeadID = " & intLeadid
connPayables.Open()
sqlcommand.ExecuteNonQuery()
connPayables.Close()
I know that the variable "judgement" is holding the correct value, what could be causeing my error?