Re: JDBC, Informix and commit
Posted in 1999
jpark2317@my-deja.com wrote: > > Has anyone ever seen this before? This is the first time i am using > informix, but not the first time i am using JDBC/Java. > > I have a result set from a select query. Depending on the data > in that row, i want to update another table. I want to commit > every 100 rows. > > So, what happens is after i do the commit, I get an sql exception > saying that the cursor is closed and i cannot process the rest of my > data. Hi :> I also had troubles with this. As far as I can see it is unclear if the jdbc driver declares its cursors with hold and I cant find any way of controlling it. Anyway there are some possible workarounds for your problem. 1. Let your driver run in autocommit mode if your task allows it. The latest informix driver definately works like you want then (tested last week). 2. Use two different connections. One for the select, one for the update. This should do the trick in the most portable way. Take care, Dirk -- -- Dirk Gunsthoevel phone: +49 (0)251 624947 -- Hoeftestr.49 fax: +49 (0)251 624177 -- 48167 Muenster mobile: +49 (0)170 5464715 -- Germany http://members.aol.com/Plabit