I have a WPF form with a button.
There is a textbox under the button and I want the .text to go into a list box
I have a WPF form with a button.
There is a textbox under the button and I want the .text to go into a list box
The syntax for your update command should be something like this, note that you haven't mentioned the name of the table in the database which is storing the data, so I've just called it ButtonTable:
...
cmd.CommandText = "UPDATE [ButtonTable] SET [TimesClicked] = @nm WHERE [ButtonName] = @buttonName;";
cmd.Parameters.Add("@buttonName", SqlDbType.VarChar, 100).Value = "Button1";
cmd.Parameters.Add("@nm", SqlDbType.Int).Value = textBox1.Text;
...
Also, I recommend specifying the type of your parameters as in the above sample.
TimesClicked, we should also use one for ButtonName.