今天才学会在写SQL语句的时候可以不用那么多的+号
用sqlparameter很方便
string SelectSQL = "select * from customers where customerid=@customerid";
SqlCmd.Connection = SqlConn;
SqlCmd.CommandText = SelectSQL;
SqlCmd.Parameters.Add("@customerid", SqlDbType.NVarChar, 50).Value = "alfki".ToUpper();

浙公网安备 33010602011771号