Win32.client, DAO.DBEngine and exceeding the file sharing count lock

Tim Golden mail at
Wed Jul 2 16:29:28 CEST 2008

Iain King wrote:
> Hi.  I'm using the win32 module to access an Access database, but I'm
> running into the File Sharing lock count as in
> The solution I'd like to use is the one where you can temporarily
> override the setting using (if we were in VB):
> DAO.DBEngine.SetOption dbmaxlocksperfile,15000

Really hurried answer:

import win32com.client

dao = win32com.client.gencache.EnsureDispatch ("DAO.DBEngine.36")
dao.SetOption (Option=win32com.client.constants.dbMaxLocksPerFile, Value=15000)


More information about the Python-list mailing list