Re: Reg : Exception ( Postgresql with Java -JDBC)

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: smitha <smitha_alice_c(at)yahoo(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Reg : Exception ( Postgresql with Java -JDBC)
Date: 2005-11-23 11:31:54
Message-ID: 4384532A.8090208@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

smitha wrote:

> &nb sp; String query1 = "CREATE user " + logName + " with password '"
> + passwd + "' createuser";
> ResultSet rs= st.executeQuery(query1);

CREATE USER does not return a resultset, so you should use
executeUpdate() or execute(), not executeQuery(). See the JDBC javadoc.

-O

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tjioe Ai Xin 2005-11-23 12:05:52 Re: Can PostgreSQL do data type automated casting in prepared
Previous Message Oliver Jowett 2005-11-23 11:30:33 Re: Switching user within connection.