原因:查询时间过长,SqlCommand的CommandTimeout属性默认为30,单位为s,查询时间查过30s后就会报错 解决:将SqlCommand的CommandTimeout属性值增大,或者直接设置为0,表示不限时。