Re: Reg : Exception ( Postgresql with Java -JDBC) - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Reg : Exception ( Postgresql with Java -JDBC)
Date
Msg-id 4384532A.8090208@opencloud.com
Whole thread Raw
In response to Reg : Exception ( Postgresql with Java -JDBC)  (smitha <smitha_alice_c@yahoo.com>)
List 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

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Switching user within connection.
Next
From: Tjioe Ai Xin
Date:
Subject: Re: Can PostgreSQL do data type automated casting in prepared