JDBC Newbie Question
От | John McLaughlin |
---|---|
Тема | JDBC Newbie Question |
Дата | |
Msg-id | 3bcf93e8_1@news.nwlink.com обсуждение исходный текст |
Список | pgsql-interfaces |
I am doing some first tinkering with JDBC and PostgreSQL and I am stumped on something. I have a simple Java program that queries a table on the PostgreSQL workstation successfully. I can iterate through the rows and display them. However, when I try to update a value, like using: ResultSet rs; ... rs.updateInt("columnName", newIntVal); The rs.updateInt() seems to succeed (no exceptions thrown), but the database never gets changed. I am using JBuilder 4, and I *can* make changes to the DB using the Data Explorer tool. So, the jdbc driver appears to be working. FYI, my connection logic starts as follows: ... Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // load database interface conn = DriverManager.getConnection("jdbc:odbc:postgresql", "myusername", "mypassword"); stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATA BLE); res = stmt.executeQuery("SELECT * FROM customer FOR UPDATE"); ... Any ideas? -- John McLaughlin _______________________ johnm@oei.com
В списке pgsql-interfaces по дате отправления: