Win32.client, DAO.DBEngine and exceeding the file sharing count lock
Iain King
iainking at gmail.com
Thu Jul 3 05:01:08 EDT 2008
On Jul 2, 8:13 pm, Tim Golden <m... at timgolden.me.uk> wrote:
> In case it helps, there's a recipe just shown up
> on the Python Cookbook which at least illustrates
> DAO use:
>
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/572165
>
> TJG
On Jul 2, 6:30 pm, "M.-A. Lemburg" <m... at egenix.com> wrote:
> You could try to use the Access ODBC driver and access the database
> that way via mxODBC. That would be faster as well:
>
> http://www.microsoft.com/technet/prodtechnol/windows2000serv/technolo...
> (scroll down to table 7.1)
>
> Apart from that option and if you are really in need for larger
> transactions, I'd suggest that you move to SQL Server for processing
> (if you can). Access is not really made for heavy-lifting and big
> transactions.
Thanks for the help. I'll check those out, in case there's a
performance gain to be had, but I found that ADO can in fact do
exactly what I want; on the comments of the page I previously linked
to which said ADO couldn't was a posting which refuted some of the
OP's claims; ADO can set some options on it's open connection,
including Max Locks Per Record. My code now looks like this:
self._connection.Open(self._DSN)
if MAX_LOCKS != None:
self._connection.Properties("Jet OLEDB:Max Locks Per File").Value
= MAX_LOCKS
rs = win32com.client.Dispatch(r'ADODB.Recordset')
N.B. I'm writing tools software for a 3rd party app which uses an
Access db as it's output format, so I'm locked in. No way to switch
to SQL server.
Thanks both!
Iain
More information about the Python-list
mailing list