none
求助:设置数据源ODBC过程中遇到的问题? RRS feed

  • 问题

  • Winxp SP3+IIS 5.1
    程序A使用位于C:\Documents and Settings\Administrator\Local Settings\Apps\2.0\9XJVYRXA.R7Z\9AGTBB8B.KKX\comm...exe_cbd1c44b1f30884f_0001.0000_zh..s_50efc195b1dfbb4e\Data\目录下的Access数据库SD.mdb
    现在想编程run.asp页面,run.asp页面能读取SD.mdb里的内容
    1 若程序A在运行时,run.asp页面无法运行,提示:错误类型:Microsoft JET Database Engine (0x80004005)不能使用 '';文件已在使用中
       是否可以通过设置'系统DSN'加SD.mdb为系统数据源来解决共享问题?
    2 若可以,在添加上述目录下的SD.mdb文件时,无法添加,是否和这个路径名称的特殊性有关系?有什么解决办法?
    2010年3月2日 2:20

答案

  • The Microsoft Jet Database Engine, core to Access, can be accessed through technologies such as ODBC or OLE DB. The data (i.e., tables and queries) can be accessed by web-based applications developed in ASP.NET, PHP, or Java. Many ISPs offer Microsoft Access as a data storage option.

    About the path you set your sd.mdb as system DSN, I just tried my test sd.mdb file at

    C:\Users\12345\Documents\My Shapes\9XJVYRXA.R7Z9AGTBB8B.KKXcomm...exe_cbd1c44b1f30884f_0001.0000_zh..s_50efc195b1dfbb4eData\9XJVYRXA.R7Z9AGTBB8B.KKXcomm...exe_cbd1c44b1f30884f_0001.0000_zh..s_50efc195b1dfbb4eData and it failed to save, the database file information is missing. However the sd.mdb file at c:\ is saved as system DSN successfully. So please try another path to save your system DSN.

    Hope this helps.


    Mark as Answer if it helps. This posting is provided "AS IS" with no warranties, confers no rights.
    2010年3月2日 9:56
  • 刚刚试验: 我在win7上同时打开了两个ACCESS,同时打开这个表,并运行两个命令行程序,一个直接读取数据文件,一个通过DSN,这四个程序均可同时读取或操作数据.Access会自动生成一个ldb的文件,为Microsoft Office Access Record-Locking Information (.ldb). 也许是你的环境比较老? 你可以试试全部通过数据源读取看看.


    Mark as Answer if it helps. This posting is provided "AS IS" with no warranties, confers no rights.
    2010年3月4日 6:09

全部回复

  • 谢谢
    问题是,如果关闭程序A的话,run.asp的页面运行正常,可以读取正常。
    所以 1 多个程序共用一个mdb文件怎么解决?
           2 若添加系统数据源,怎么解决那个目录问题?

    2010年3月2日 6:06
  • The Microsoft Jet Database Engine, core to Access, can be accessed through technologies such as ODBC or OLE DB. The data (i.e., tables and queries) can be accessed by web-based applications developed in ASP.NET, PHP, or Java. Many ISPs offer Microsoft Access as a data storage option.

    About the path you set your sd.mdb as system DSN, I just tried my test sd.mdb file at

    C:\Users\12345\Documents\My Shapes\9XJVYRXA.R7Z9AGTBB8B.KKXcomm...exe_cbd1c44b1f30884f_0001.0000_zh..s_50efc195b1dfbb4eData\9XJVYRXA.R7Z9AGTBB8B.KKXcomm...exe_cbd1c44b1f30884f_0001.0000_zh..s_50efc195b1dfbb4eData and it failed to save, the database file information is missing. However the sd.mdb file at c:\ is saved as system DSN successfully. So please try another path to save your system DSN.

    Hope this helps.


    Mark as Answer if it helps. This posting is provided "AS IS" with no warranties, confers no rights.
    2010年3月2日 9:56
  • Also, here is an article with rich and detail information that could be helpful as well: http://tutorials.aspfaq.com/8000xxxxx-errors/80004005-errors.html
    Mark as Answer if it helps. This posting is provided "AS IS" with no warranties, confers no rights.
    2010年3月2日 9:56
  • The Microsoft Jet Database Engine, core to Access, can be accessed through technologies such as ODBC or OLE DB. The data (i.e., tables and queries) can be accessed by web-based applications developed in ASP.NET, PHP, or Java. Many ISPs offer Microsoft Access as a data storage option.

    About the path you set your sd.mdb as system DSN, I just tried my test sd.mdb file at

    C:\Users\12345\Documents\My Shapes\9XJVYRXA.R7Z9AGTBB8B.KKXcomm...exe_cbd1c44b1f30884f_0001.0000_zh..s_50efc195b1dfbb4eData\9XJVYRXA.R7Z9AGTBB8B.KKXcomm...exe_cbd1c44b1f30884f_0001.0000_zh..s_50efc195b1dfbb4eData and it failed to save, the database file information is missing. However the sd.mdb file at c:\ is saved as system DSN successfully. So please try another path to save your system DSN.

    Hope this helps.


    Mark as Answer if it helps. This posting is provided "AS IS" with no warranties, confers no rights.

    非常感谢,但是这个路径无法更改,这是程序创建的路径,(而且这个程序是微软为某个公司的项目设计的程序)有没有其他什么办法?

    2010年3月2日 12:29
  • 多个程序共用一个mdb文件怎么解决?没法解决, mdb文件只能让打开它的程序独占。Access支持多用户不是在文件级别而是在程序级别。
    为什么不把 mdb拷出来一份, 你的.asp程序就可以访问mdb的拷贝了。
    2010年3月3日 1:42
  • 多个程序共用一个mdb文件怎么解决?没法解决, mdb文件只能让打开它的程序独占。Access支持多用户不是在文件级别而是在程序级别。
    为什么不把 mdb拷出来一份, 你的.asp程序就可以访问mdb的拷贝了。

    我想解决办法是把这个mdb设置为系统数据源,然后程序A和run.asp都可用共享使用?这样可行吗?
    winxp SP3下目录特殊问题?win 7可用设置。
    2010年3月3日 5:38
  • 刚刚试验: 我在win7上同时打开了两个ACCESS,同时打开这个表,并运行两个命令行程序,一个直接读取数据文件,一个通过DSN,这四个程序均可同时读取或操作数据.Access会自动生成一个ldb的文件,为Microsoft Office Access Record-Locking Information (.ldb). 也许是你的环境比较老? 你可以试试全部通过数据源读取看看.


    Mark as Answer if it helps. This posting is provided "AS IS" with no warranties, confers no rights.
    2010年3月4日 6:09
  • 这两天我也遇到同样的问题:

    Winxp SP3+IIS 5.1

    程序A: vb编写,一直打开mdb数据库进行读写:
      Set db = OpenDatabase(dbf, False)
      Set rs = db.OpenRecordset(" select * from table2 ")

    程序B :asp编写,通过IE查询数据  
      Set conn = Server.CreateObject("ADODB.connection")
      conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(""&dbf&"")
      set rs=server.createobject("adodb.recordset")
      sql=" select * from table2 "
      rs.open sql,conn,1,1

    单独运行都没问题。 但是一旦启动了A程序, IE客户端打开B.asp时就出错:
      Microsoft JET Database Engine (0x80004005)
      不能使用 '';文件已在使用中。

    2010年4月11日 1:41