[DB-SIG] Cookbook for Python access to Access?
vernondcole at gmail.com
Sun Oct 10 14:59:40 CEST 2010
I can't test this right now, but it looks like one may be able to get that
information from a table called "dbf.databases".
Check out the documentation in
I note where it says: "To get a list of the objects in a database, you
iterate through each Collection object. The following example iterates
through each TableDef, QueryDef, Relation, and Container object in a
database, and prints the object name to the Debug window."Followed by a VB
example. If you can work out how to do that retrieval in SQL you will have
Let us know what works, if it works.
On Thu, Oct 7, 2010 at 1:57 PM, Goldsmith, David <dgol461 at ecy.wa.gov> wrote:
> Thanks, Vernon. I did as you suggest, including visiting
> I still don't see how to return a list of tables available in the DB one
> has connected to.
> I can't believe no one has ever needed to do this, yet all the replies
> I'm getting/examples I'm being referred to/methods I read about would
> seem to indicate that such an operation is generally not supported by
> the DB model--is that correct?
> -----Original Message-----
> From: Vernon Cole [mailto:vernondcole at gmail.com]
> Sent: Thursday, October 07, 2010 10:44 AM
> To: Goldsmith, David; DB-SIG @ Python.org
> Subject: Re: [DB-SIG] Cookbook for Python access to Access?
> please pardon slowness, brevity & typos ... am on vacation & using
> Windows Mobile...
> step 1) load pywin32 from sourceforge.
> step 2) look in your Python site-packages/adodbapi/test folder for
> You can read or update ACCESS db using normal SQL statements and
> Python api calls.
> On 10/3/10, Goldsmith, David <dgol461 at ecy.wa.gov> wrote:
> > Hi! I'm relatively new to DB's, though not to Python. I simply need
> > learn how to programmatically put data--obtained using a Python
> > script--into an existing Access DB. I've searched and I've searched,
> > found a few brief examples of how to connect--using, e.g.,
> > when I execute a query, I'm told the file I've connected to is either
> > encrypted or not a DB; it may be the former (I don't know how to tell
> > for certain, but I can access it using MATLAB's database toolbox w/out
> > any explicit decryption), but it definitely is a DB. Can anyone refer
> > me to a relevant cookbook or pretty complete example set? Thanks!
> > --------------------------------------
> > David Goldsmith
> > Washington State Department of Ecology
> > Environmental Assessment Program
> > Modeling and Information Support Unit
> > 300 Desmond Drive | P.O. Box 47600
> > Lacey, WA 98503 | Olympia, WA 98504-7600
> > Tel: (360) 407-6194
> > Fax: (360) 407-6884
> > Email: david.goldsmith at ecy.wa.gov
> <mailto:david.goldsmith at ecy.wa.gov>
> > Station: C2D-59
> > Web: http://www.ecy.wa.gov/programs/eap/
> > <http://www.ecy.wa.gov/programs/eap/>
> DB-SIG maillist - DB-SIG at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the DB-SIG