Mx.ODBC insert error
sjmachin at lexicon.net
Tue Jan 29 19:44:29 CET 2008
On Jan 30, 3:27 am, Greg Corradini <gregcorrad... at gmail.com> wrote:
> I've never gotten this traceback error before using mx.ODBC.
"traceback error"?? I see no problem with the traceback.
> Any ideas about
> resolving this issue? The statement and the error it generates are listed
The error was "generated" by you. The error message was generated by
"[Microsoft][ODBC Microsoft Access Driver]"
> curse.execute("Insert into FHWA_StandSamp_2008(LRS_ID_NEW)
> values('0402000010') where LRS_ID = '0403700010'")
> Traceback (most recent call last):
> File "<pyshell#37>", line 1, in ?
> curse.execute("Insert into FHWA_StandSamp_2008(LRS_ID_NEW) values
> ('0402000010') where LRS_ID = '0403700010'")
> ProgrammingError: ('37000', -3516, '[Microsoft][ODBC Microsoft Access
> Driver] Missing semicolon (;) at end of SQL statement.', 4612)
Like it says, ProgrammingError.
INSERT INTO table (columns) VALUES (values)
INSERT INTO table (columns)
SELECT stuff FROM somewhere [WHERE boolean_expression] ....
or perhaps even
UPDATE table SET column = expression WHERE boolean_expression
Perhaps you could consider avoiding combining random fragments of SQL
or English and hoping for tolerant fuzzy parsing by the recipient :-)
More information about the Python-list