[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]
代码如下:
声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com