You need to put strings in double quotes. The sql string argument to the SqlCommand constructor needs to be quoted.
myCommand = New SqlCommand("UPDATE task SET ...
don't put @ in front of the webserver control instances (you are confusing them with TSQL parameters)
myCommand = New SqlCommand("UPDATE task SET Numbercardused=" & TextBox1.text & " ...
The dropDownList you need to use the Selectedvalue property
... Numberfreetv=" & Dropdownlist1.SelectedValue & " ...
You need to execute the command now it's built:
myCommand.ExecuteNonQuery()
hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68