欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

js DataSet数据源处理代码_javascript技巧

程序员文章站 2022-05-20 13:33:39
...
[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]
复制代码 代码如下: