[DB-SIG] file locking error bonking access (long!)
kromag@nsacom.net
kromag@nsacom.net
Mon, 4 Jun 2001 11:26:44 -0700 (PDT)
After looking over my incredibly clever code and getting a good clout on the
head, I saw that I was opening and closing the db connection within my while
loop.
Opening the connection outside of said loop got my numbers up to:
1000 records written in 12.9600000381 seconds.
Which is just a tad better! :-)
Hope this helps someone else.
d
kromag@nsacom.net said:
> I am having some weirdness occour while experimenting with access 97 SR2.
>
> I am using python 2.0 under windows 95B.
>
> When I run the scripts copied below, I occaisionally get the following:
>
> --------begin barfage--------------------
>
> 816
> 817
> 817 records written in 167.529999971 seconds.
> Traceback (most recent call last):
> File "c:windowsdesktoptryme.py", line 19, in ?
> dbwrite.writetwo(pack)
> File "c:python20dbwrite.py", line 26, in writetwo
> db=engine.OpenDatabase("windowsdesktopdb1.mdb")
> File "<COMObject DAO.DBEngine.35>", line 2, in OpenDatabase
> pywintypes.com_error: (-2147352567, 'Exception occurred.', (0,
> 'DAO.Workspace',
> "Couldn't lock file.", None, -1, -2146825238), None)
>