Re: Help:updateRow() with CIDR types
От | Moray Taylor |
---|---|
Тема | Re: Help:updateRow() with CIDR types |
Дата | |
Msg-id | 96F339F8-95D8-11D8-9535-0003935AA5C0@the400.homeunix.com обсуждение исходный текст |
Ответ на | Re: Help:updateRow() with CIDR types (Kris Jurka <books@ejurka.com>) |
Ответы |
Re: Help:updateRow() with CIDR types
|
Список | pgsql-jdbc |
On 24 Apr 2004, at 02:57, Kris Jurka wrote: > > > On Sat, 24 Apr 2004, Moray Taylor wrote: > >> >> On 23 Apr 2004, at 01:29, Oliver Jowett wrote: >> >>> Moray Taylor wrote: >>>> Hi, >>>> I'm having some trouble updating CIDR types using jdbc, I use >>>> updateObject() to change it, which goes OK, but when I do an >>>> updateRow(), I get this error >>>> java.sql.SQLException: ERROR: invalid cidr value: "1.1.1.1/4" >>>> at >>>> org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateRow(AbstractJdbc2R >>>> es >>>> ul tSet.java:1117) >>> > > Well this first error is backend error with detail of "Value has bits > set > to right of mask." Using a valid cidr value such as 192.168.1.0/24 > produces the driver error I imagine you are complaining about. > >> I was using updateObject(), I changed it to updateString, I still get >> an SQLException, with no getMessage() data, however, the data IS >> entered into the database, but the ResultSet isn't updated, i.e. I >> have >> to requery to see the results. Any ideas? >> > > I have applied the attached patch to fix this to the cvs and stable > branches. Binary versions are available here: > http://www.ejurka.com/pgsql/jars/ > > Kris Jurka<updatecidr.patch> > ---------------------------(end of > broadcast)--------------------------- > TIP 3: if posting/reading through Usenet, please send an appropriate > subscribe-nomail command to majordomo@postgresql.org so that your > message can get through to the mailing list cleanly Hi, Thanks very much for the patch, but I'm having a problem with the updated jars, I am getting a lot of these errors... ERROR:Operation requires a scrollable resultset, but this resultset is FORWARD_ONLY. org.postgresql.util.PSQLException: Operation requires a scrollable resultset, but this resultset is FORWARD_ONLY. at org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkScrollable(AbstractJdbc 2ResultSet.java:179) at org.postgresql.jdbc2.AbstractJdbc2ResultSet.first(AbstractJdbc2ResultSet .java:258) There errors occur when I do a getFirst() on the resultsets that get create by methods like getCatalogs(), and getColumns() Has something else changed in the CVS that would cause this, I never had these errors with the 7.5 (build 301) resultsets. Thanks very much for your assistance. Moray
В списке pgsql-jdbc по дате отправления: