RE: SQLException from Postgres JDBC
| От | Daniel Gayo Avello |
|---|---|
| Тема | RE: SQLException from Postgres JDBC |
| Дата | |
| Msg-id | 006801c0295c$dd7d99a0$0e64a8c0@STARTUP.COM обсуждение исходный текст |
| Ответ на | SQLException from Postgres JDBC ("Daniel Gayo Avello" <danielgayo@terra.es>) |
| Список | pgsql-interfaces |
Thanks both of you (Jens and Peter), yes, I'm using executeQuery and should be executeUpdate()... Newbie mistakes. Thanks again. Dani > > In fact, the operations are done but they don't return any results so > > a exception is catch by the servlet. > > Do this means that the data is inserted/deleted, even though you get an > exception? Then I would guess you handle the returned result in the > wrong way, or something like it. > > ///Jens Carlberg > Which method are you using to perform the INSERT or DELETE? > > You should be using executeUpdate() rather than executeQuery() because > executeUpdate() doesn't expect a ResultSet to be returned, and > executeQuery should throw an SQLException when it fails to get one. > > Peter
В списке pgsql-interfaces по дате отправления: