On 29/12/2009 14:34, Vernon Cole wrote:
Robin:
A quick reminder -- odbc (in pywin32) is db api version 1.0 compliant.
adodbapi is db api version 2.0 compliant, and uses odbc DSN connections by
default if you use a simple connection string.
Select your db module by deciding what level of api compliance you need.
If you use adodbapi, the module will return datetime.datetime by default.
You can request time.datetime (let the programmer beware) or mxdatetime if
you wish.
I didn't even know about adodbapi, but it's on my machine anyway. The layer
above the database is pretty simple and we are attempting to use
mxodbc/odbc/mysql/csv so the api at level 1.0 is probably sufficient (at least
it has been up to now). I think the problem is to decide whether odbc will
return datetime.datetime or PyTime. If the worst comes to the worst I can just
turn off the warning during the import.
I cannot give an authoritative answer for odbc (sorry).
--
Vernon
On Tue, Dec 29, 2009 at 6:44 AM, Robin Becker<ro...@reportlab.com> wrote:
I'm trying to use the odbc extension in a cross-python version. The problem
is that recent pythons/win32 versions have changed the odbc dbi interface.
Is there a way to check whether I should be importing dbi to find the type
of date to be used or just assuming datetime is used?
In the modern context just importing dbi causes a warning so I would prefer
to avoid testing the result of dbi.dbiDate(..) etc etc
--
Robin Becker
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32
--
Robin Becker
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32