Does ODBC support 'tables()' function ?

Stefan Radke stefan_radke at csi.com
Fri Jun 25 10:17:16 CEST 1999


Looking for a database solution that is portable between Windows 95 and another
OS I thought to use the ODBC interface. I played around with several options,
including myQDBC for MySQL database, but a MS Access databse as well. Everything
went pretty smooth. Marc-Andre Lemburg's python module mxODBC works fine.

But now I have the idea to be able to find out which tables are available in a
database connected. When trying to use the <cursor>.tables() function I get the
following error message on an Access database:(db is database handle, c is
cursor):

> >>> c.tables('','','','')
> Traceback (innermost last):
>   File "<interactive input>", line 0, in ?
> NotSupportedError: ('S1C00', 84, '[Microsoft][ODBC Microsoft Access 97 Driver]
> Driver not capable ', 3383)
>

On mySQL databases I only get the number returned by 'c.tables('','','','').
Then, trying:

> >>> c.tableprivileges('','','')
> Traceback (innermost last):
>   File "<interactive input>", line 0, in ?
> NotSupportedError: ('IM001', 0, '[Microsoft][ODBC Driver Manager]
> Driver does not support this function', 3431)
>
How can I get the names of the tables ???

I spent almost a whole day in the MSDN Library to get information on the ODBC
interface implemented; I got the impression that it should work ... I checked
the ODBC Drivers installed; all are version 3.5.xxx .

On my crusade through the web I came accross a post in this newsgroup referring
to My SQL.pyd together with a DLL which now gives me direct access to MySQL
databases. Fine, and are there similar Python modules for other OSs ???

Many questions at once, but a wrapup of several days od trial.
I will be happy about answers !

Thank you, Stefan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: stefan_radke.vcf
Type: text/x-vcard
Size: 162 bytes
Desc: Card for Stefan Radke
URL: <http://mail.python.org/pipermail/python-list/attachments/19990625/370760a7/attachment.vcf>


More information about the Python-list mailing list