Windows Server 2008, IIS7.5 and connection to MS Access 97 database

时光怂恿深爱的人放手 提交于 2019-12-11 07:56:01

问题


I know, the topic sounds terrible. But I actually have to connect these technologies.

Problem

I am currently migrating company's intranet (written mostly in classic ASP) from Windows Server 2003 32 bit with IIS 6 to Windows Server 2008 R2 64 bit with IIS 7.5. Everything works perfectly fine except for one subpage which uses set conn = server.createobject("adodb.connection") to connect to connstring="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=path\to\mdb\which\is\really\there".

I open connection (conn.open connstring), build a query string and then, when I want to set rsresult = conn.execute(sqlusr) I get

Microsoft OLE DB Provider for ODBC Drivers error '80004005' 
[Microsoft][ODBC Microsoft Access Driver] ODBC--connection to 'TABLE_THAT_ACTUALLY_EXISTS' failed.

That error is thrown at the line with conn.execute(sqlusr). Of course, it worked fine in previous environment.

What have I tried?

  • connect to MS Access accdb file on Windows Server 2008 - I learned that Windows Server 2008 has MSJet preinstalled, so this question is of no use (reminder: mdb is for Access 97)
  • http://support.microsoft.com/kb/168336 - this is actually how the connection is made but I thought that sth may be wrong, misspelled, ...
  • I copied ODBC data sources form previous server to the new one (I kept the names) - problem still exists
  • I installed the latest updates on Windows Server 2008 machine

Additional info

  • mdb will open only in Access 97 (why? don't ask me : / I wasn't the only one who tried to open it in Access 2000/2003/2007/2010 - it worked nowhere)
  • application pool for this web page on IIS 7.5 has Enable 32-bit Applications option set to true. Parent paths are also enabled.

I will be grateful for any additional tips on what to check/do/how to fix this issue.


回答1:


OK this is an interesting question.

First - exists a documented problem using Classic ASP - IIS 7.x - ADODB.JET.4.0 you can see a guide to solve your problem

Using Classic ASP with Microsoft Access Databases on IIS

Second - i strongly recommend you to not use the JET DRIVER anymore, instead use the ADODB.ACE.12.0 driver, while you can get the same functionality that you can obtain with the JET driver, also you get the advantage that the new Access file formats can be read and the driver can be implemented in a pure 64-bits enviroment

ACEDB driver download (Microsoft)

with this driver you can set the Enable 32-bit Applications to false




回答2:


OK, I solved my problem. I was able to import data and forms from Access 97 to Access 2010 really easily. Then I encountered some problems with asp and its connection to mdb. So I connected directly to the database. I still have to fix sql statement, but the main problem is resolved.

Thanks!



来源:https://stackoverflow.com/questions/12492872/windows-server-2008-iis7-5-and-connection-to-ms-access-97-database

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!