Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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.


In response to

pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group