读取access 文件 在asp.NET中

在配置文件中

  <connectionStrings>
    <add name="db" connectionString="mytable.mdb"/>
  </connectionStrings>

 

在读取的文件中

            string path = System.Configuration.ConfigurationManager.ConnectionStrings["db"].ConnectionString;
            path = Server.MapPath("../Db/" + path);
            Response.Write(path);

posted @ 2009-04-03 11:15  China2008  阅读(131)  评论(0编辑  收藏  举报