RT
public DataTable getOleTable(string selectSQL, string tableName)//获得一个表,2个参数,一个SQL语句,一个表名
{
string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\DataCol_1.mdb";
DataTable table = new DataTable(tableName);
OleDbConnection oleConnection = new OleDbConnection();
try
{
OleDbDataAdapter oleDataAdapter = new OleDbDataAdapter(selectSQL, connectionString);
oleDataAdapter.Fill(table);
}
catch (System.Data.OleDb.OleDbException ex)
{
throw ex;
}
catch (System.Exception ex)
{
throw ex;
}
finally
{
if (oleConnection.State != ConnectionState.Closed)
{
oleConnection.Close();
}
}
return table;
}
好象不能啊...
public DataTable getOleTable(string selectSQL, string tableName)//获得一个表,2个参数,一个SQL语句,一个表名
{
string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\DataCol_1.mdb";
DataTable table = new DataTable(tableName);
OleDbConnection oleConnection = new OleDbConnection();
try
{
OleDbDataAdapter oleDataAdapter = new OleDbDataAdapter(selectSQL, connectionString);
oleDataAdapter.Fill(table);
}
catch (System.Data.OleDb.OleDbException ex)
{
throw ex;
}
catch (System.Exception ex)
{
throw ex;
}
finally
{
if (oleConnection.State != ConnectionState.Closed)
{
oleConnection.Close();
}
}
return table;
}
好象不能啊...
http://www.microsoft.com/downloads/details.aspx?FamilyID=6C050FE3-C795-4B7D-B037-185D0506396C&displaylang=zh-cn