原来的连接
server=.;database=test;uid=sa;pwd=sa;
解决方案
"Data Source=数据库地址;Initial Catalog=数据库名;User ID=用户名;Password=密码";

不知道原因,谁知道告诉我!谢谢!

相关文章: