configuring ODBC DSN with a python script
omission9
rus20376 at salemstate.edu
Fri Feb 6 11:40:30 EST 2004
"Robert Brewer" <fumanchu at amor.org> wrote in message news:<mailman.1260.1076005686.12720.python-list at python.org>...
> Jani Yusef wrote:
> > I am building an application which, unfortunately,
> > *must* use an access db...
> > how do I configure the ODBC dsn without having the
> > user open up the ODBC control panel which will in
> > all honesty just scare and confuse them. ;)
>
> I opined:
> > the thought crosses my mind that ODBC entries are merely a lump
> > of registry keys--you might just create or even copy those
> > programatically. That would be my first attempt.
>
> and omission9 added:
> > Below is some code which more or less implements this...
>
> Great work! I knew *someone* must have tried that before. :)
>
> > One thing is that the system dsn created works perfectly fine but for
> > whatever reason doesn't show up in the odbc control panel. I am not
> > very well versed in Windows specific programming so am not sure why
> > that is but would like to know why. Anybody know why that is?
>
> First guess: you need an entry in
> HKEY LOCAL MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources
OK, at the risk of strating to get a little OT.......
That looks to be correct but when I go to modify ODBC Data Sources as
I have with the other reg keys I get an access denied error. Any idea
about that?
More information about the Python-list
mailing list