Prasanth Reddy wrote:
> From log file:
> ERROR: invalid byte sequence for encoding "UTF8": 0x92
> STATEMENT: SELECT * FROM client_data WHERE status_code = 0 ORDER BY
> client_name, description
>
> Code that causes it:
> String sql = "SELECT * FROM client_data WHERE status_code = 0 ORDER BY
> client_name, description";
> ResultSet rs = connection.createStatement().executeQuery(sql);
> *
> *How do I set the connection property?
String connectionString = "jdbc:postgresql://" + host + "/" + database +
"?user=" + username
+ "&password=" + password + "&loglevel=" + logLevel;
Connection dbConnection = DriverManager.getConnection(connectionString);
Sample Test
http://dandymadeproductions.com/temp/PostgreSQL_JDBC_Test.java
danap.