ASP running in 64 bits environment with Access database
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 rese开发者_如何学JAVAarch 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.
Have you set IIS to run in 32-bit mode? You probably need to make the config change suggested by Microsoft.
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;"
I am not sure if Access 2010
is of use to you, but it might be worth checking as it mentions 64-bit.
精彩评论