读取数据库比较标准语句asp.net c#

private static DataTable shuju()
{
OleDbConnection conn = new OleDbConnection("provider=microsoft.jet.oledb.4.0;data source=|datadirectory|data.mdb;");
conn.Open();
OleDbCommand comm = new OleDbCommand("select * from data", conn);
DataTable dt = new DataTable();
using (OleDbDataReader sdr = comm.ExecuteReader(CommandBehavior.CloseConnection))
{
dt.Load(sdr);
}
return dt;


}

你可能感兴趣的:(读取数据库比较标准语句asp.net c#)