摘要: 1.使用数据适配器sqldataAdapter填充datagridviewSqlConnection conn = new SqlConnection("server = ZHANGMING;user id = sa;pwd=!#%@$^;Database=Logic"); SqlDataAdapter dap = new SqlDataAdapter("SELECT M.[FID] AS 序号 ,M.[FName] AS 姓名,T1.FName AS 民族,T2.FName AS 性别 ,M.[FIDCard] AS 身份证,M.[FBirthday] AS 生 阅读全文
posted @ 2012-07-16 18:52 美丽的矩阵 阅读(226) 评论(0) 推荐(0) 编辑
摘要: // 连接OleDbConnection cn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\\test.mdb;");cn.Open();cn.Close();// 读取数据到DataTableOleDbConnection cn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\\test.mdb;");DataTable userTbl = new DataT 阅读全文
posted @ 2012-07-16 16:51 美丽的矩阵 阅读(173) 评论(0) 推荐(0) 编辑