maomao_6070
maomao_6070
2017-11-05 08:20

C#连接数据库报错--大神请指教(问题已附图及程序)

  • c#
  • 数据库

图片说明
程序代码:
String constr = "data source=192.168.2.178;Initial Catalog=shiyan;integrated security=SSPI";
SqlConnection con = new SqlConnection(constr);
String sql = "select * from wlyhb where name='admin'";
SqlCommand com = new SqlCommand(sql, con);
con.Open();

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答