Office's Access XP ODBC DBI from PythonWin

Steve Holden sholden at holdenweb.com
Wed Jun 13 22:23:50 EDT 2001


"Dirk Leas" <dirkLeas at mac.com> wrote in message
news:mailman.992468723.17992.python-list at python.org...
> Anybody luck working w/ DbiDate from query result? Check out the
> following:
>
> >>> import dbi, odbc
> >>> db = odbc.odbc('testAccess')
> >>> cursor = db.cursor()
> >>> cursor.execute('select * from person')
> 0
> >>> rows = cursor.fetchall()
> >>> rows
> [(1, 'Joe Smith', <DbiDate object at 010ED560>), (2, 'Mary Smith',
> <DbiDate object at 010CEBC0>)]
> >>> str(rows[0][2])
> '__builtins__\x00])\n\n\x00\x00\x00\xd0\xb2\x12\x1e'
>
> I'm running the latest of AS's Python with the Win32 extensions against
> Office XP Access.
>
Has the Win32 odbc module been updated at all since 2.0? I have a feeling
you might find it less than satisfactory for extended use - I've certainly
had problems myself.

Unfortunately the dbi.dbiDate object has a null __doc__,but I notice the
dbi.py module requires mx.DateTime. Had you considered using mx.ODBC instead
of ODBC? If you don't plan commercial use it is free, and I can certainly
recommend it for ease of use.

regards
 Steve

--

http://www.holdenweb.com/





More information about the Python-list mailing list