Last post Jul 06, 2010 03:55 PM by atconway
Jul 06, 2010 07:46 AM|kennya1|LINK
I am running a vb.net program and keep getting an MaxLocksPerFile error
I am running ona 32 bit machine and I have updated in the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Access Connectivity Engine\Engines\MaxLocksPerFile to equal 000186a0 (100000)
In addition I have written in my program the following DAODBEngine_definst.SetOption(dao.SetOptionEnum.dbMaxLocksPerFile, 100000)
However I cannot go above 9500 Records because I get a MaxLocksPerFile ERROR
Jul 06, 2010 03:55 PM|atconway|LINK
It appears you have followed the advice of this link:
"File sharing lock count exceeded…" error message during large transaction processing:
...and at this point if you have maxed out, I can't think of anything else to do except move to a database engine that can handle these situations better like SQL Server. When you have that many concurrent locking transactions going on with Microsoft Access,
it is time to graduate to SQL Server. If Access is a must, you may want to shift this question to an Access forum to see if there is anything else you can do.
Possibly the forum below, although I think it is more for VBA.
Access for Developers:
One 'coding' solution would be to queue up transactions and only allow them to occur under the limit (i.e. <10000) that will throw that exception, or try and catch that exception and then rerun the failed transactions.