[python-win32] ODBC and Oracle

Dean Allen Provins dprovins at tridentexploration.ca
Wed Jun 28 23:35:06 CEST 2006


Hello:

Is there a trick to adding a Python ODBC connection to Oracle?

Under Windows, with Python's "odbc" module, I can see MS Access (twice), 2
system databases that the IT people created. and at various times. dbase and
excel as data sources.

Curiously, the list of sources varies with my attempts to see what's available.
 The code I used was:

import odbc
for i in range (100):
  try:
    odbc.SQLDataSources (i)
    print i
  except:
    continue

This prints the data source and the index at which it was found.  A sample
listing looks like:

('PMO_RO', 'Oracle in OraHome92')
1
('MS Access Database', 'Microsoft Access Driver (*.mdb)')
2
('MS Access Database', 'Microsoft Access Driver (*.mdb)')
31
('CMS', 'Oracle in OraHome92')
32

Note the repetition.  Note also that while Access always appears, the other two
may be replaced by 'dbase' or 'excel' (very curious).

I've tried to add the Oracle odbc module to the "data source Administrator' for
the database I want to access, but it refuses to appear.

Any ideas?

Regards,

Dean



Confidentiality Notice:  The information transmitted herein may
contain confidential, proprietary and/or privileged material which
belongs to Trident Exploration Corp. and its affiliates and is
intended only for the addressee(s).  Any unauthorized review,
distribution or other use or the taking of any action in reliance
upon this information is prohibited.  If you received this email in
error, please contact the sender or call (403) 770-1765 and delete
this email and any copies.


More information about the Python-win32 mailing list