Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion pyodbc driver for DB2 database - Please Help
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
bansi  
View profile  
 More options Dec 15 2010, 10:29 am
From: bansi <mail2ba...@gmail.com>
Date: Wed, 15 Dec 2010 07:29:20 -0800 (PST)
Local: Wed, Dec 15 2010 10:29 am
Subject: pyodbc driver for DB2 database - Please Help

I downloaded Python 2.7 (python-2.7.1.amd64.msi) and pyodbc the python
extension module (i.e. pyodbc-2.1.8.win-amd64-py2.7.exe)

I wrote a sample script as shown below to connect to database

import csv
import pyodbc
conn =
pyodbc.connect("Driver={db2};Database=TEST001;Hostname=db2server;Port=5­­
0001;Protocol=TC

PIP;Uid=username;Pwd=password;",
autocommit = True , ansi = True)
curs = conn.cursor()
curs.execute('select count(edokimp_id) from edokimp')
print curs.fetchall()

The script resulted in following error

pyodbc.Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data
source na
me not found and no default driver specified (0) (SQLDriverConnectW)')

I thought pyodbc is shipped with DB2 driver. From the error i realize
that i need to download separate driver for DB2 database. So Could you
please point me to the website where i can download the appropriate
driver for DB2 database and later how to configure it so that the
script works.

Thanks for your time in advance as i am newbie to Python with JAVA
experience.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.