[Ajax.AjaxMethod()]
public DataSet GetDataSet()
{
OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:工作项目分析 estdb.mdb;Persist Security Info=True;");
DataSet ds = new DataSet();
try
{
OleDbCommand cmd = conn.CreateCommand();
cmd.CommandText = "select * from t_name";
cmd.CommandType = CommandType.Text;
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
da.Fill(ds);
return ds;
}
catch
{
conn.Close();
throw;
}
}
[/code]