摘要:
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 生 阅读全文
摘要:
// 连接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 阅读全文