Valid SQL?
Harlin Seritt
harlinseritt at yahoo.com
Tue May 23 09:21:04 EDT 2006
Thanks for the help. I set up the SQL statement to be like:
INSERT INTO tblFoo (field1, field2) VALUES ('value1', 'value2')
I get this error:
insert into Web1_DLTDS10_RootSite (dateTime, values) values('Sat Apr 15
08:58:13
2006', '0')
Traceback (most recent call last):
File "librarian.py", line 45, in ?
Cursor.execute(InsertValuesSQL)
File "C:\Python24\lib\site-packages\MySQLdb\cursors.py", line 137, in
execute
self.errorhandler(self, exc, value)
File "C:\Python24\lib\site-packages\MySQLdb\connections.py", line 33,
in defau
lterrorhandler
raise errorclass, errorvalue
_mysql_exceptions.ProgrammingError: (1064, "You have an error in your
SQL syntax
; check the manual that corresponds to your MySQL server version for
the right s
yntax to use near 'values) values('Sat Apr 15 08:58:13 2006', '0')' at
line 1")
Any idea why I'm getting this?
Thanks,
Harlin Seritt
More information about the Python-list
mailing list