[Tutor] Difficulty connecting with odbc drivers
John CORRY
john.corry at ntlworld.com
Sat Apr 15 15:21:31 CEST 2006
Hi,
I have downloaded the mxodbc product. I am using windows xp, python 2.4
and I am trying to log onto a visual foxpro database file. I have
downloaded the visual foxpro driver. I use the following code:
import mx.ODBC
import mx.ODBC.Windows
db = mx.ODBC.Windows.DriverConnect('dsn=c:/test/m2m/data/cost_grid.dbf')
c = db.cursor()
and I get the following error:
Traceback (most recent call last):
File "C:\Python24\Lib\site-packages\databasemanager.py", line 4, in ?
db =
mx.ODBC.Windows.DriverConnect('dsn=c:/test/m2m/data/cost_grid.dbf')
OperationalError: ('IM002', 0, '[Microsoft][ODBC Driver Manager] Data
source name not found and no default driver specified', 6044)
What am I doing wrong and what do I need to do? Any help would be
greatly appreciated.
Thanks,
John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20060415/fa9c4d72/attachment.html
More information about the Tutor
mailing list