I have a small program which compacts access database using DAO COM api. The program works, except around 50% of the time hangs on exit for about 15 seconds. So I have decided to investigate and try to understand why. What I have discovered is a https connection originating from the program back to ip addresses belonging to MS. Wireshark shows a dns lookup for nexus.officeapps.live.com. If I fire Access app, I get the same behavior, dns lookup followed by connection to MS If I downgrade DAO provider from DAO.DBEngine.120 to DAO.DBEngine.36, there is no network activity. If I block the network (disable network in VM), the timeout is gone and of course no connection. I also tried to tweak Access settings. In Trust Center/Privacy Options, both checkboxes are off.

Is there any programmatic or configuration way to stop access calling back home?

The program should be used in corporate environment, so there is internet connection but the direct connection will be blocked. I can't switch to Jet4, some of the sample files I have don't compact with older version.

Here is the program for the reference:

import os
import win32com.client

# DAO_ENGINE = "DAO.DBEngine.36"
DAO_ENGINE = "DAO.DBEngine.120"

def compact_db(db_filename):
    tmp_filename = db_filename + "-compacted"
    except FileNotFoundError:
    print("compacting ", end='')
        engine = win32com.client.Dispatch(DAO_ENGINE)
        engine.CompactDatabase(db_filename, tmp_filename)
        if engine is not None:
            del engine
    os.replace(tmp_filename, db_filename)



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.