chornbeak / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

help me pyodbc error #342

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
import pyodbc  
DBfile ='/db2.mdb' 
conn = pyodbc.connect('DRIVER={Microsoft Access Driver (*.mdb)};DBQ='+DBfile) 
cursor = conn.cursor() 

SQL ='SELECT Artist, AlbumName FROM RecordCollection ORDER BY Year;'

cursor.close() 
conn.close()

C:\Users\admin\Desktop\scan>python p.py
Traceback (most recent call last):
  File "p.py", line 3, in <module>
    conn = pyodbc.connect('DRIVER=Microsoft Access Driver (*.mdb);DBQ='+DBfile)

pyodbc.Error: ('IM002', '[IM002] [Microsoft][ODBC \xc7\xfd\xb6\xaf\xb3\xcc\xd0\x
f2\xb9\xdc\xc0\xed\xc6\xf7] \xce\xb4\xb7\xa2\xcf\xd6\xca\xfd\xbe\xdd\xd4\xb4\xc3
\xfb\xb3\xc6\xb2\xa2\xc7\xd2\xce\xb4\xd6\xb8\xb6\xa8\xc4\xac\xc8\xcf\xc7\xfd\xb6
\xaf\xb3\xcc\xd0\xf2 (0) (SQLDriverConnect)')

help

Original issue reported on code.google.com by luan3959...@gmail.com on 17 Oct 2013 at 7:21