From: Daniel Gayo Avello <danielgayo@terra.es>
To: pgsql-interfaces@postgresql.org
Subject: RE: SQLException from Postgres JDBC
Date: Thu, 28 Sep 2000 16:56:22 +0200
Message-ID: <006801c0295c$dd7d99a0$0e64a8c0@STARTUP.COM> (raw)
References: <003a01c02958$4ce7e2a0$0e64a8c0@STARTUP.COM>
<39D358A3.2412A8AF@lysator.liu.se>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: danielgayo@terra.es
Subject: RE: SQLException from Postgres JDBC
In-Reply-To: <006801c0295c$dd7d99a0$0e64a8c0@STARTUP.COM>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox