Python ODBC

Clayton Brown - Emmie Osawa claysjunkmail at yahoo.com
Tue Aug 28 05:45:37 EDT 2001


I am trying a basic case of SQL Insert INTO an access databse using
python.
Can anyone point out why this does not work? Note: DSN works, SQL
works in SQL2000, TRACKS table exists, database = access 2000.

<CODE>
import dbi, odbc

sqlInsert = "INSERT INTO TRACKS (INTERNAL_ID) VALUES ('1472738')"
myconn = odbc.odbc('CD_DSN')
cursor = myconn.cursor()
cursor.execute(sqlInsert)
myconn.commit()
cursor.close()
myconn.close()
</CODE>


Error Produced:
cursor.execute(sqlInsert)
dbi.program-error: [Microsoft][ODBC Microsoft Access Driver] 
Could not find output table 'TRACKS'. in EXEC



More information about the Python-list mailing list