[python-win32] Opening an DAO database with password?
Jim Vickroy
Jim.Vickroy at noaa.gov
Tue Feb 6 16:35:36 CET 2007
Grzegorz Adam Hankiewicz wrote:
> Grzegorz Adam Hankiewicz wrote:
>
>> Hello.
>>
>> I'm following
>> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52267 to open a
>> local .mdb file and export the contents. It works with normal databases,
>> but I cannot open a password protected database.
>>
>> According to http://www.oreilly.de/catalog/progacdao/chapter/ there is
>> no password option in the OpenDatabase method, so I've tried using
>> daoEngine.DefaultPassword = xxxx without success.
>>
>> Does somebody know if this is possible and how?
>>
>
> I've found a visual basic example using Dao and the password is passed
> as an attribute string. Hence the following will work under python:
>
> daoEngine.OpenDatabase(infile, False, False, "MS Access;pwd=xxxxx")
>
>
You want to try visiting:
http://www.connectionstrings.com/
where, for example, you will find:
Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=C:\myFolder\myAccess2007file.accdb;Jet OLEDB:Database
Password=MyDbPassword;
as a connection string for Access.
-- jv
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20070206/fa288213/attachment.htm
More information about the Python-win32
mailing list