Re: [Tutor] Intro for interfacing with Microsoft Access?
Tony Meyer wrote: Does anyone know of any online resource that explains how to interface to Microsoft Access via Python, where the intended audience is someone who knows Python, but not the Microsoft innards? These two pages are quite good: http://starship.python.net/crew/bwilk/access.html http://www.ecp.cc/pyado.html adodbapi gives a Python DB-API interface to ADO. It seems to work with Access. http://sourceforge.net/projects/adodbapi Kent =Tony.Meyer ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
RE: [Tutor] Intro for interfacing with Microsoft Access?
[Terry Carroll] Does anyone know of any online resource that explains how to interface to Microsoft Access via Python, where the intended audience is someone who knows Python, but not the Microsoft innards? [Tony Meyer] These two pages are quite good: http://starship.python.net/crew/bwilk/access.html http://www.ecp.cc/pyado.html [Terry Carroll] Thanks. Unfortunately, both of those seem to assume you know Python and the Win APIs, but not how to connect the, For someone who doesn't know the APIs, they're actually not very helpful. The second link has very simple steps - you basically just retype the code from steps 1 to 3 and you're all connected. Then pick one of the following steps, depending on what you want to (read, insert, etc), and retype the code from there. Once you have the recordset object (steps 1-3), you can easily modify the existing examples to do whatever you want just by referencing the reference material in Access itself (I forget what it's called - the object reference material that you get to via the macro stuff). When I first needed to work with Access, I knew nothing about ADO or coding Access, but something about writing Python, and this got me up and running very easily. But I do appreciate you taking the time to point them out. No worries. =Tony.Meyer ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Intro for interfacing with Microsoft Access?
Does anyone know of any online resource that explains how to interface to Microsoft Access via Python, where the intended audience is someone who knows Python, but not the Microsoft innards? There is an ODBC module that should allow you to spit SQL at Access. Alan G ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Intro for interfacing with Microsoft Access?
You have to set up your Access database as an ODBC data source. I can't give you all the details but on my Win2k system if I go to Start / Control Panels / Administrative Tools / Data Sources (ODBC) that is the place to set it up. IIRC you give the data source a name. Then in the ODBC driver (the win32all odbc package) you create a connection giving it the data source name and probably a user name and password. When it's all set up you can use SQL to talk to the database. You might have to fiddle a bit to get all the pieces set up :-) It looks like the win32all package uses the Python DB-API so you can read about that (find the database SIG at python.org) for some help in how to use it. I did this long ago from Java so I'm pretty sketchy on the details, maybe someone else is more current on it than me. Kent Terry Carroll wrote: On Fri, 14 Jan 2005, Kent Johnson wrote: A couple of minutes of googling for 'python odbc' finds the ODBC driver that comes with win32all. It seems to have a fairly simple interface. The download from this page has an example: http://py.vaults.ca/apyllo2.py/D906422565 Thanks, Kent. I'm not familiar with OBDC, but I'll look into it. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
[Tutor] Intro for interfacing with Microsoft Access?
Does anyone know of any online resource that explains how to interface to Microsoft Access via Python, where the intended audience is someone who knows Python, but not the Microsoft innards? I've found http://starship.python.net/crew/bwilk/access.html (which doesn't work for me, and presumably is out of date) and http://www.ecp.cc/pyado.html (which mostly works well enough, but assumes you know Microsoft's Data Access Objects (DAO), and points to the overwhelming Microsoft ADO API Reference. I don't want to do anything too fancy, just read data from my database, make a few calculations and print some summaries obtained from it. I know Python, but not Access (it's my company's DB, not mine) or DAO. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Intro for interfacing with Microsoft Access?
A couple of minutes of googling for 'python odbc' finds the ODBC driver that comes with win32all. It seems to have a fairly simple interface. The download from this page has an example: http://py.vaults.ca/apyllo2.py/D906422565 HTH Kent Terry Carroll wrote: Does anyone know of any online resource that explains how to interface to Microsoft Access via Python, where the intended audience is someone who knows Python, but not the Microsoft innards? I've found http://starship.python.net/crew/bwilk/access.html (which doesn't work for me, and presumably is out of date) and http://www.ecp.cc/pyado.html (which mostly works well enough, but assumes you know Microsoft's Data Access Objects (DAO), and points to the overwhelming Microsoft ADO API Reference. I don't want to do anything too fancy, just read data from my database, make a few calculations and print some summaries obtained from it. I know Python, but not Access (it's my company's DB, not mine) or DAO. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Intro for interfacing with Microsoft Access?
On Fri, 14 Jan 2005, Kent Johnson wrote: A couple of minutes of googling for 'python odbc' finds the ODBC driver that comes with win32all. It seems to have a fairly simple interface. The download from this page has an example: http://py.vaults.ca/apyllo2.py/D906422565 Thanks, Kent. I'm not familiar with OBDC, but I'll look into it. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor