ASP running in 64 bits environment with Access dat

2019-07-27 07:21发布

问题:

I have a customer since 2003 running a simple web site built in asp 3.0 with an access database file (.mdb). Recently that customer aquired a new server that came with windows 2003 server 64 bits and the web site doesn´t function any more, showing this message:

ADODB.Connection error '800a0e7a' Provider cannot be found. It may not be properly installed.

Of course I allready did some web research and found that it seems to be a problem with 64 bit environment using mdb files (access database). I don´t know what to do. Code for connecting with database:

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\dados\politics\consulta\camara.mdb;MODE=Read;Jet OLEDB:Database Password=1234;"

P.S. In 32 bit environment everything works OK. I really need some help here. Thanks.

回答1:

Have you set IIS to run in 32-bit mode? You probably need to make the config change suggested by Microsoft.



回答2:

I am not sure if Access 2010 is of use to you, but it might be worth checking as it mentions 64-bit.



回答3:

I've come across the issue before. It is caused by most Office installations being 32 bit, even on 64 bit machines. You can solve this though if you have 32 bit Office installed on a 64 bit machine. You can install the Access database driver from Microsoft. You need to download and install the 64 bit version. If you try and install this You'll need to install this via the command prompt (cmd.exe) and add the /passive flag.

cmd.exe c:\locationofdownloadedfile\AccessDatabaseEngine_x64.exe /passive

(Don't forget to run cmd.exe as administrator if appropriate)

You can then use the following connection string in your asp code:

Set Con = Server.CreateObject("ADODB.Connection")
Con.Open "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\pathtoaccessdatabase\accessdatabase.mdb;Persist Security Info=False;"