473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Mx.ODBC insert error


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

--
View this message in context: http://www.nabble.com/Mx.ODBC-insert...p15163149.html
Sent from the Python - python-list mailing list archive at Nabble.com.

Jan 29 '08 #1
2 1583
On Jan 30, 3:27 am, Greg Corradini <gregcorrad...@gmail.comwrote:
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
Jan 29 '08 #2

Thanks John. I now see it

John Machin wrote:
>
On Jan 30, 3:27 am, Greg Corradini <gregcorrad...@gmail.comwrote:
>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
--
http://mail.python.org/mailman/listinfo/python-list

--
View this message in context: http://www.nabble.com/Mx.ODBC-insert...p15166795.html
Sent from the Python - python-list mailing list archive at Nabble.com.

Jan 29 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: dcarson | last post by:
I've read about this error in several other discussions, but still can't seem to pinpoint the problem with my code. Everything seemed to be working fine for some time, but it now tends to bomb out...
9
by: Jacques Lebastard | last post by:
I have a problem writing PHP ODBC scripts that suit both MySQL and PostgreSQL. So far, the following syntaxes seem to apply to each database (this is an 'insert' example; the same differences apply...
0
by: NM | last post by:
Hello, I've got a problem inserting binary objects into the postgres database. I have binary objects (e.g. images or smth else) of any size which I want to insert into the database. Funny is it...
8
by: Godzilla | last post by:
Dear all, I cannot find a solution for my problem with inserting a blob object (>4000 in length) into an ORACLE database via ODBC. I have tried the two ways of inserting the blob object (a...
0
by: Greg Corradini | last post by:
Hello all, I'm having trouble inserting an SQL selection into a new MS Access table. I get a parameter error on my insert statement when I try this (see below for code and error msg). I'm not sure...
2
by: Greg Corradini | last post by:
Hello All, A few weeks ago, I wrote two scripts using mx.ODBC on an Access DB. Among other things, both scripts create new tables, perform a query and then populate the tables with data in a...
12
by: Johnny BeGood | last post by:
Hi All, When a user enters an Apostrophe into a text area field on a form, i.e. didn't, it mucks with odbc as follows Syntax error (missing operator) in query expression ''didn't', Whats...
4
by: Szymon Dembek | last post by:
Hi Recently I did some DB2 and ODBC coding in Visual FoxPro. I bumped on a problem I cannot resolve. When I issue a delete statement that deletes no rows (no rows qualify for the WHERE...
2
by: sepe | last post by:
Hello, I've a problem with SQL Server and OLE DB. SQL Server handles NULL as NULL whereas empty string is stored as a space. This is correct when using OLE DB but with ODBC an empty string gets...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.