|
Give an example of connecting access.
string strConn = "Provider = Microsoft.Jet.OLEDB.4.0; Persist Security Info = True; Data Source = d:\\aa.mdb";
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection (strConn);
conn.Open ();
DataTable dt = conn.GetOleDbSchemaTable (System.Data.OleDb.OleDbSchemaGuid.Columns, null);
conn.Close ();
this.DataGrid1.DataSource = dt.DefaultView;
this.DataGrid1.DataBind (); |
|