What is the quickest way to get classic ASP pages to work with an Access mdb file on Windows Server 2022?

JC 21 Reputation points
2022-12-06T03:18:46.8+00:00

I just spent many, many hours migrating from a Windows Server 2008 VPS to a Windows Server 2022 VPS.

One of the last things i need to do is get some ASP pages working that work with an Access Database using the below connection string:

dConnStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source = " & Server.MapPath("_database/database.mdb") '& ";"

I want to keep the time to do this to a minimum, so I don't want to rewrite it for SQL Server or SQL Express - I like having the data in a single portable file.

Is it just a matter of installing this x64 database engine ("Microsoft Access Database Engine 2016 Redistributable")?

https://www.microsoft.com/en-us/download/details.aspx?id=54920

But then the bottom of this page seems to say I need to install "Microsoft 365 Access Runtime" because the server does NOT have any office app installed on it:

https://learn.microsoft.com/en-us/office/troubleshoot/access/cannot-use-odbc-or-oledb

So, can anyone give me advice on how to get this working quickly? I would be very grateful :)

-John

Microsoft 365 and Office | Access | Development
0 comments No comments
{count} votes

Accepted answer
  1. Albert Kallal 5,586 Reputation points
    2022-12-06T04:52:02.293+00:00

    Ok, well, since this is a JET engine file (mdb), then you should not have to actually install anything.

    You only need to install/use/setup/have the newer ACE data engine if you are using a accdb file format, and not mdb file format.

    There is ALSO a 2nd criteria here, and that is ensuring that the IIS web server also has x32 bit support turned on. While near all (everything) these days runs as x64 bits, if you do run the IIS server (which is going to be x64 bits), then you can turn on x32 bit support.

    that would be this setting:

    267634-image.png

    So, you only really have to install ace/access runtime x64 if you BOTH using a accdb file, or you want/need/will run the application pool for the web site as x64 bits. But, as above shows, you can still run/have/use/enjoy an application pool as x32 bits for that web site.

    And since windows xp days, and that includes server based editions of windows? They all STILL have a version of the JET data engine installed (but, it ONLY x32 bit version).

    So, if you want to run the web site as x64 bits? Then yes, you need to install + setup access (or ACE) data engine as x64 bits.

    However, with the web app pool set to run as x32 bits, then you don't even have to install anything on the web server, since as noted, the JET data engine is installed by default.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.