[Tutor] help with data insert into Access table

Ahmed, Shakir shahmed at sfwmd.gov
Wed Jan 29 16:18:29 CET 2014


Hi,

I am trying to insert a record in the access table, the value has a quote and could not insert the record. Any idea how I can insert records like this quotes.

Thanks
S


cursor.execute("INSERT INTO PicsPostInfo(Pics_name) values ('Site Name's Harbor.JPG')")
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
ProgrammingError: ('42000', "[42000] [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''Site Name's Harbor.JPG')'. (-3100) (SQLExecDirectW)")


We value your opinion. Please take a few minutes to share your comments on the service you received from the District by clicking on this link<http://my.sfwmd.gov/portal/page/portal/pg_grp_surveysystem/survey%20ext?pid=1653>.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140129/b7599199/attachment.html>


More information about the Tutor mailing list