摘要: 1,引用命名空间 using System.Data.SqlClient;2,定义五大对象 SqlConnection con = null; SqlCommand cmd = null; SqlDataAdapter adapter = null; SqlDataReader reader = null; DataSet set = null;3,给五大对象赋值(1)SqlConnection 第一种方式:使用命令构建者连接数据库 SqlConnectionStringBuilder conStr2 = new SqlConnectionStringBuilder(); conStr... 阅读全文
posted @ 2013-04-22 15:28 namehwh 阅读(149) 评论(0) 推荐(0) 编辑