110,534
社区成员
发帖
与我相关
我的任务
分享
public DataTable GetData(String strSQL)
{
OleDbConnection conn = new OleDbConnection();
DataSet ds = new DataSet();
try
{
conn = new OleDbConnection(Myfunction.DBconn());
OleDbDataAdapter da = new OleDbDataAdapter(strSQL, conn);
//OleDbCommandBuilder cb = new OleDbCommandBuilder(da);
da.Fill(ds, "table");
return ds.Tables["table"];
}
finally
{
conn.Close();
}