Best python module for Oracle, but portable to other RDBMSes

dananrg at yahoo.com dananrg at yahoo.com
Wed Mar 1 14:51:50 EST 2006


Thanks Gerhard and Magnus. Magnus, thanks for the references. I will
follow up on those.

I was messing around with the native ODBC module you mentioned (I am
using Python in a Win32 environment), e.g:

import dbi, odbc

...and it seems to meet my needs. The only issue I've had so far is
retrieving data from Oracle when an integer has been defined like:

       number(p)    [same thing as number(p,0) evidently

This is from a database I didn't design and can't change. The problem
is that the ODBC module suffixes an "L" to any integer returned that
was defined as data type number(p). For example, an integer stored as:
 56  will be returned as 56L. Numbers that were specified as
number(p,s), the module has no problem with.

Anyone know why this would happen?

Incidentally, performance isn't an issue for this particular use case.




More information about the Python-list mailing list