Hi all, I trying to connect to MSSQl 2005 Database which is on a x64 bit machine. i have installed 32bit python2.5 and pyodbc.pywin32-211 i have created a odbc DSN. When i'm using this DSN in the script it errors out saying ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0)')
Here is my script import pyodbc,sys,os conString = "DSN=int2003r2-64bit;UID=sa;PWD=kbuilder" try: con = pyodbc.connect(conString) except pyodbc.Error, erno: mesg = "Error:Unable to establish connection to Database" print mesg print erno sys.exit(1) cur = con.cursor() query = "select id from CLIENT where name = 'int2003r2-64bit'" try: cur.execute(query) except pyodbc.Error, erno: mesg = "Unable to execute %s query" % query print mesg sys.exit(1) for row in cur: clientId = row[0] Please Help. Thanks Sid
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32