Reputation: 43
Application Background: Trying to deploy an automation application where user selects *access file and visualize graphs from the python flask backend calculation.
Locally, Downloaded "Access Driver": https://www.microsoft.com/en-us/download/details.aspx?id=54920 [which ran fine]. But unable to deploy on Azure.
Things that I have tried:
I have tried to run this application using Github CI/CD but with Github actions azure can only give option to run on linux os. which will give me the same error (pyodbc connection)
Build Docker image that could eliminate this error however, when selected 'FROM python:slim-buster' under Dockerfile - It generated docker image with linux which gives the same error.
Also, tried adding windows OS in the Dockerfile using FROM microsoft/nanoserver
, still received an error while creating an image.
I am new to all these and think might be making mistakes. Any help will be appreciated.
Upvotes: 2
Views: 738
Reputation: 1
To add some knowledge to this and a similar problem:
I seemingly managed to install both AccessDatabaseEngine_X64.exe and AccessDatabaseEngine.exe in by docker image based on mcr.microsoft.com/windows/servercore:ltsc2022. Running
`Get-OdbcDriver | Where-Object { $_.Name -like '*Access*' }`
in Powershell listed the driver like it was installed, but i still got this very cryptic message when trying to use it in a very simple python script;
pyodbc.Error: ('HY000', 'The driver did not supply an error!')
Enabling ODBC tracing and reviewing the logs did not give a more detailed explanation.
What solved this problem for me was to base the Dockerfile on another Windows Base image. Either of these worked for me;
mcr.microsoft.com/windows/server:ltsc2022
, mcr.microsoft.com/windows:ltsc2019
Now i could magically use the Microsoft Access Database Engine in my windows Docker container!
Upvotes: 0
Reputation: 43
So After a lot of trial and error, I was able to deploy on windows server on Azure.
What worked:
Deploying application on windows server with ODBC driver (AccessDatabaseEngine.exe). Not the 64bit(AccessDatabaseEngine_X64.exe).
One can deploy using Docker image also but ** FROM microsoft/nanoserver ** was not able to build any image. Instead try with ** FROM mcr.microsoft.com/windows/servercore:ltsc2019 **
Upvotes: 1