JDBC Newbie Question - Mailing list pgsql-interfaces

From John McLaughlin
Subject JDBC Newbie Question
Date
Msg-id 3bcf93e8_1@news.nwlink.com
Whole thread Raw
List 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 by date:

Previous
From: "hero"
Date:
Subject: pgaccess select chinese Big5 data error
Next
From: Antonio Sergio de Mello e Souza
Date:
Subject: ECPG segmentation fault