[egenix-users] Invalid Syntax for Insert stmt

Jim Vickroy Jim.Vickroy at noaa.gov
Fri Oct 18 09:09:23 CEST 2002


Bob,

This is a standard Python error message; it has nothing to do with
mx.ODBC.

Try:

c.execute("insert into Table1 (SSN, Field1) values ('44', 'mxPerson')")

Note the outer string delimiters are quotation marks (") instead of
apostrophe marks (').

The reason for the use of " is because your SQL statement, itself,
contains '.


Bob Buchanan wrote:

> I keep getting 'Invalid syntax' when I try the following insert
> statement:
> c.execute('insert into Table1 (SSN, Field1) values ('44',
> 'mxPerson')')
>
> Can you tell me why?  I'm using mxODBC to insert into an MSAccess db.
>
>
> Where can I find documentation for mxODBC?  The information contained
> on
> www.egenix.com/files/python/mxODBC.html
> <http://www.egenix.com/files/python/mxODBC.html> is not detailed
> enough.
>
> Thanks in advance for your help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman-archives/egenix-users/attachments/20021018/5dd377db/attachment-0139.htm


More information about the egenix-users mailing list