[DB-SIG] mxODBC insert error. Reply
Khawaja-Shahzad Butt
kshahzadbutt at gmail.com
Thu Oct 14 22:13:10 CEST 2004
All these Values are strings.
On Thu, 14 Oct 2004 22:07:16 +0200, Marcos Sánchez Provencio
<msanchez at grupoburke.com> wrote:
> Please tell us what the values of the parameters are and how the table
> columns are defined.
>
> El jue, 14-10-2004 a las 21:53, Khawaja-Shahzad Butt escribió:
>
>
> > Hi,
> > When i try to insert into MS SQL server using mxODBC. python gives me
> > 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 559, in ?
> > 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 417, in dbinsertfeeditem
> >
> > DataError: ('22005', 0, '[Microsoft][ODBC SQL Server Driver]Invalid
> > character value for cast specification', 4579)
> >
> >
> >
> > Here is my insert statement:
> >
> > q="""INSERT INTO rss_feed_items(
> > item_date,
> > item_title,
> > item_author,
> > item_permalink,
> > item_description)
> > VALUES(
> > ?, ?, ?, ?, ?)"""
> >
> > c.execute(q,(item_dmodified,feed_item_title,item_author,feed_item_link,feed_item_feeddescription))
> >
> > Could anyone tell me what seems to be wrong. Please reply.
> >
> > Thank you,
> > Regards
> > Shahzad
> > _______________________________________________
> > DB-SIG maillist - DB-SIG at python.org
> > http://mail.python.org/mailman/listinfo/db-sig
>
> _______________________________________________
> DB-SIG maillist - DB-SIG at python.org
> http://mail.python.org/mailman/listinfo/db-sig
>
--
-----------------------------------------------
Shahzad
Student Programmer
Iowa State University Extension
http://www.extension.iastate.edu/mt/shahzad/
More information about the DB-SIG
mailing list