[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]
复制代码 代码如下: