[DB-SIG] Problems with mxODBC insert statement..Please help
Khawaja-Shahzad Butt
kshahzadbutt at gmail.com
Wed Oct 13 17:02:15 CEST 2004
Hi,
I am using mxODBC as interface between python and MS SQL Server.
I am using pythonwin.
When i try to run following SQL query
c.execute ( 'insert into
rss_feed_items(item_date,item_title,item_author,item_permalink,item_description)\
VALUES(?,?,?,?,?)',(item_dmodified, feed_item_title,item_author,
feed_item_link,feed_item_feeddescription) )
I get this error:
Traceback (most recent call last):
File "C:\Python23\Lib\site-packages\Pythonwin\pywin\framework\scriptutils.py",
line 310, in RunScript
exec codeObject in __main__.__dict__
File "C:\feedparser-3.3\feedparser\test.py", line 548, in ?
print data;
File "C:\feedparser-3.3\feedparser\test.py", line 41, in info_extract
rss_20extraction(result,url)
File "C:\feedparser-3.3\feedparser\test.py", line 312, in rss_20extraction
dbinsertfeeditem(feed_item_title,feed_item_link,item_author,feed_item_feeddescription,item_dmodified)
File "C:\feedparser-3.3\feedparser\test.py", line 413, in dbinsertfeeditem
ProgrammingError: ('37000', 0, '[Microsoft][ODBC SQL Server
Driver]Syntax error or access violation', 4504)
Can you tell me the correct way to use insert statement. An example will help
a lot. Also should i have to use auto commit with mxODBC or not.
Regards
Shahzad
More information about the DB-SIG
mailing list