摘要: ////1.连接数据库 ////连接字符串.连接字符传的作用:告诉Connection对象要连接哪个服务器,哪个数据库,用户名、密码是多少。等一些其他连接选项. //string constr = "Data Source=zxtiger;Initial Catalog=CZBK;User Id=sa;Password=111"; ////使用连接对象 //SqlConnection con = new SqlConnection(constr); ////2.打开连接 ... 阅读全文
posted @ 2012-04-24 23:31 前方辉煌 阅读(167) 评论(0) 推荐(0) 编辑