既然选择CommandType.Text,就应该将参数替换到sql语句中,不要使用变量了。cmd.CommandText = string.Format("select * from WSN where factor='{0}' and list='{1}'", factor, list);
SqlCommand对象呢?
@ list这里目测有个空格,你去掉试试?