读取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);

你可能感兴趣的:(asp.net)