我的代码:
SqlConnection con = new SqlConnection(@"DATA;");
SqlDataAdapter cmd = new SqlDataAdapter();
cmd.InsertCommand = new SqlCommand(" UPDATE TIME set TimeOut = @TimeOut Where TimeOut = @textBox1.Text", con);
cmd.InsertCommand.Parameters.Add("@timeOut", DateTime.Now);
con.Open();
cmd.InsertCommand.ExecuteNonQuery();
con.Close();
错误:必须声明标量变量"@textBox1"
I tried declaring a variable with textBox1.Text but it didn't work
1条答案
按热度按时间vltsax251#