参数化查询…期望参数“ @units”(未提供)
我收到此异常: 参数化查询'(@Name nvarchar(8),@ type nvarchar(8),@ units nvarchar(4000),@ rang'期望使用未提供的参数'@units'。 我的插入代码是: public int insertType(string name, string type, string units = "N\\A", string range = "N\\A", string scale = "N\\A", string description = "N\\A", Guid guid = new Guid()) { using (SqlConnection connection = new SqlConnection(connectionString)) { connection.Open(); SqlCommand command = new SqlCommand(); …