Question about ODBC

Ian Holmes ianholmes01 at
Wed Aug 28 11:51:40 CEST 2002

k.weinert at (Karsten Weinert) wrote in message news:<fa576652.0208271822.1b4f0155 at>...
> Hi,
> I can not understand the following behavior of the Access ODBC driver 
> and/or Python. The problem is: I open a ODBC connection, do some
> SQL-statements, for example create a new table an put some data in it.
> Then I close the connection. When I open the connection again, the new
> table has disappeared!

Although transacions are autocommited by default (I think) - couldn't
really make sence of the docs - your script is not autocommitting i.e.
the changes you make are not been writtern to the database.

after the for loop add this line

  for i in range(10):
    sqlmsg="INSERT INTO test13 VALUES (%d,%d)" % (i, i*i)

its partner conn.rollback() can be used if an error occours

Links - mxODBC docs at

More information about the Python-list mailing list