Mx.ODBC insert error

G

Greg Corradini

Hello,
I've never gotten this traceback error before using mx.ODBC. Any ideas about
resolving this issue? The statement and the error it generates are listed
below.

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)

Thanks
Greg
 
J

John Machin

Hello,
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
below.

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.

Try
INSERT INTO table (columns) VALUES (values)
or
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 :)

HTH,
John
 
G

Greg Corradini

Thanks John. I now see it

John said:
Hello,
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
below.

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.

Try
INSERT INTO table (columns) VALUES (values)
or
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 :)

HTH,
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,042
Latest member
icassiem

Latest Threads

Top