Python ODBC

Maan Hamze mmhamze at pleiades.net
Tue Aug 28 07:39:17 EDT 2001


for sqlInsert try
NameofDatabase.Tracks instead of Tracks and see if this works.
Maan

"Clayton Brown - Emmie Osawa" <claysjunkmail at yahoo.com> wrote in message
news:1b9aff84.0108280145.1298676a at posting.google.com...
> 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