string tablenamesql = "SELECT tablename FROM dbo.updateAccess WHERE URL='"+url+"'";
DataTable tablenamedata = ClsCommon.getDataTable(tablenamesql);
string tablename = tablenamedata.Rows[0][0].ToString();
//声明access中的数据引擎
string strConnection = "Provider=Microsoft.Jet.OleDb.4.0;";
//数据源的位置
strConnection += @"Data Source=" + Server.MapPath("~/PO/Access1/" + url + "") + "";
//建立连接
OleDbConnection objConnection = new OleDbConnection(strConnection);
//打开数据连接
objConnection.Open();
转载于:https://www.cnblogs.com/tinaw/p/Access.html