小编Dav*_*pel的帖子

`必须在...处声明标量变量?有人可以解释这是什么吗?

有人可以帮我宣布一个标量变量吗?我真的不明白这个Scalar Variable宣言.

下面是导致我的异常的代码.

int customer_Id;
int.TryParse(customer_IDTextBox1.Text, out customer_Id);

string SQL = @"UPDATE Customer
               SET Customer_Name = @customer_Name
               WHERE Customer_ID = @customer_Id";
SqlCommand sqlCommand = new SqlCommand(SQL, sqlConnection);
sqlCommand.Parameters.AddWithValue("@customer_Name", customer_Name);

sqlConnection.Open();
sqlCommand.ExecuteNonQuery();
Run Code Online (Sandbox Code Playgroud)

sql

-4
推荐指数
1
解决办法
253
查看次数

标签 统计

sql ×1