From: | "John McLaughlin" <johnm(at)oei(dot)com> |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | JDBC Newbie Question |
Date: | 2001-10-19 02:46:46 |
Message-ID: | 3bcf93e8_1@news.nwlink.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)oei(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Antonio Sergio de Mello e Souza | 2001-10-19 23:10:45 | ECPG segmentation fault |
Previous Message | hero | 2001-10-17 06:00:43 | pgaccess select chinese Big5 data error |