[egenix-users] insert fails with no error
JBard at wyeth.com
Thu Jul 17 17:28:35 CEST 2008
Thanks! That was it. Adding db.commit() at the end made it work.
>>> Jim Vickroy <Jim.Vickroy at noaa.gov> 7/17/2008 4:15 PM >>>
Joel Bard wrote:
> I'm connecting from linux x86_64 to a sqlserver2005 instance using mxODBC 3.0.1 with unixODBC. I'm able to retrieve data with no problem. When I try a simple insert:
> p2="mxodbc test"
> c.execute("insert into bug" + \
> " (UIElement,Description)" + \
> "values (?,?)" \
> ,(p1,p2) \
> c.rowcount is 1 but the row is not present in the table. If I execute the same sql command using isql it works. The table uses an autoincrement key column and values for the key are consumed even though the record is not being created. c.messages is empty. The same behavior is seen regardless of whether parameters are used and regardless of wether I use execute or executedirect. Any help would be appreciated.
> eGenix.com User Mailing List http://www.egenix.com/
Is this perhaps a transactional issue? Have you tried to explicitly
commit the insert transaction?
Disclaimer: I not an mx.ODBC user -- just a "lurker".
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the egenix-users