我知道哪里错了,但不知该如何改,求高手帮忙 错的地方是roomstyle2=@room2" 注:列名无错,与数据库一致string sqlc2 = "select count(*) from 客房信息 where roomstyle1=@room1 and status=0  and roomstyle2=@room2";
                    SqlCommand com2 = new SqlCommand(sqlc2,sqlcon);
                    com2.Parameters.AddWithValue("@room1",room1);
                    com2.Parameters.AddWithValue("@room2",room2);
                    int num = (int)com2.ExecuteScalar();
                    textBox2.Text = num.ToString();
运行结果为 列名 'roomstyle2' 无效