From: Oliver Jowett <oliver@opencloud.com>
To: Minal <minalac@yes2etl.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: postgresql.stat.result
Date: Wed, 03 Aug 2005 18:38:03 +1200
Message-ID: <42F0664B.8010100@opencloud.com> (raw)
In-Reply-To: <42F05EA7.4000102@yes2etl.com>
References: <42F05EA7.4000102@yes2etl.com>
Minal wrote:
> org.apache.jasper.JasperException: postgresql.stat.result
(this must be a fairly old driver, but..)
> sql="SELECT sp_login ('INSERT','admin','"+username+"','"+password+"')";
> //sql="INSERT INTO USERS (USERTYPE,USERNAME,PASSWORD) VALUES
> ('admin','"+username+"','"+password+"')";
> pStat=conn.prepareStatement(sql);
> msg=pStat.executeUpdate();
You must use executeQuery() to execute SQL that returns a result. Per
the JDBC javadoc, if you use executeUpdate() to run a query that returns
a ResultSet, the driver should throw a SQLException.
-O
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, minalac@yes2etl.com
Subject: Re: postgresql.stat.result
In-Reply-To: <42F0664B.8010100@opencloud.com>
References: <42F05EA7.4000102@yes2etl.com> <42F0664B.8010100@opencloud.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