How to Connect to MS Access Database Using Azure PowerShell Function App

Dinesh Kumar 15 Reputation points
2024-10-16T16:05:18.78+00:00

Hello Everyone

I am currently working on a project to extract queries data from an MS Access database (both .mdb and .accdb formats) into a CSV file using PowerShell. I have developed a script that works fine on my local system; however, I encounter an error when executing it in the Azure PowerShell function app.

After researching the issue, I discovered that my local system has the ACE driver installed, while the Function App only supports the Jet driver. I would like to know if there is a way to install the ACE driver in the Function App.

For testing purposes, I was able to extract queries data from an .mdb file using the Function App successfully.

Any assistance with this issue would be greatly appreciated.

Thanks.

Dinesh

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,087 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,582 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Khadeer Ali 575 Reputation points Microsoft Vendor
    2024-10-17T00:56:45.58+00:00

    Hi @Dinesh Kumar,

    Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.

    The primary challenge you're facing is the incompatibility between the ACE driver (used on your local system) and the Jet driver (supported by the Function App) for accessing MS Access databases.

    For this We have to alternative for both the type of files.

    • If your MS Access database is in the .mdb format, you can directly use the Jet OLEDB provider in your PowerShell script.
    • If your database is in .accdb format, consider converting it to .mdb using Microsoft Access or other tools. This will make it directly compatible with the Jet OLEDB provider. By following these steps, you should be able to successfully connect to your MS Access database and extract query data using an Azure PowerShell Function App.

    If the issue persists, please do not hesitate to reach out further assistance. If you find this answer helpful, please click "Comment" and kindly upvote it.


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.