How to get a list of table names for a database via ODBC in Windows using mxODBC/python?

Paul Boddie paul at boddie.net
Mon Oct 7 11:38:44 EDT 2002


zxo102 at hotmail.com (Ouyang) wrote in message news:<f10f7c39.0210042214.4c504b98 at posting.google.com>...
> Does anyone know how to get a list of table names for a database via
> ODBC in Windows using mxODBC and python? Thanks in advance.

In the mxODBC documentation...

  http://www.egenix.com/files/python/mxODBC.html#Cursors

...under the heading...

  Additional Cursor Methods only available in mxODBC

...there's a method documented called "tables". Try calling this
method on a cursor with None for each of the parameters, replacing
each None with something more relevant to your situation where
appropriate.

Paul



More information about the Python-list mailing list