Understanding mxODBC Insert Error

Greg Corradini gregcorradini at gmail.com
Sun Jul 29 12:41:31 EDT 2007


Hello,
I'm trying to perform a simple insert statement into a table called
Parcel_Test (see code below). Yet, I get an error message that I've never
seen before (see traceback below). I've tried to put a semicolon at the end
of the sql statement, but with no luck. Any ideas from more experienced
mx.ODBC users?

CODE
>>> driv='DRIVER={Microsoft Access Driver (*.mdb)};DBQ='+workspace
>>> conn = odbc.DriverConnect(driv)
>>> crs = conn.cursor()
>>> sql = "INSERT into Parcel_Test(NEAR_FID,NEAR_DIST) values
>>> ('0.000000','0.000000') where PIN_ID = '042822120008'"
>>> crs.execute(sql)

TRACEBACK
Traceback (most recent call last):
  File "<pyshell#1>", line 1, in ?
    crs.execute(sql)
ProgrammingError: ('37000', -3516, '[Microsoft][ODBC Microsoft Access
Driver] Missing semicolon (;) at end of SQL statement.', 4612)


-- 
View this message in context: http://www.nabble.com/Understanding-mxODBC-Insert-Error-tf4166125.html#a11852950
Sent from the Python - python-list mailing list archive at Nabble.com.




More information about the Python-list mailing list