pyodbc.Error 'IM002' connecting to DB2
问题 I downloaded Python 2.7 ( python-2.7.1.amd64.msi ) and pyodbc, the python extension module for connecting to DB2 database (i.e. pyodbc-2.1.8.win-amd64-py2.7.exe ). I wrote sample script as shown below. import csv import pyodbc conn = pyodbc.connectpyodbc.connect('DRIVER={DB2};SERVER=localhost;DATABASE=DBT1;UID=scott;PWD=tiger;') curs = conn.cursor() curs.execute('select count(edokimp_id) from edokimp') print curs.fetchall() The script throws following error pyodbc.Error: ('IM002', '[IM002]