pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dennis Gesker <dennis@gesker.com>
To: Dennis Gesker <dennis@gesker.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: JdbcRowSet Problem
Date: Mon, 25 Jul 2005 15:18:55 -0600
Message-ID: <42E5573F.3020405@gesker.com> (raw)
In-Reply-To: <42E54026.1020506@gesker.com>
References: <42E54026.1020506@gesker.com>

Apparently I also needed a rowSet.updateObject statment.  I'm working 
now.  --drg
Dennis Gesker wrote:

> Hello All:
>
> I seem to be having a strange problem with the JDBC driver. I'm 
> writing a simple Swing application where a JTable is populated from 
> data in a postgres database. I'm using a JdbcRowSet. The table 
> populates just fine.
>
> However, I can't seem to update the information in the JTable. Below 
> is the code added to the JTables tablemodel to update the data.
>
> No error is returned and it appears that all command in this function 
> are called.
>
> Is anyone else having this kind of problem? Could some point me in the 
> right direction?
>
> Thanks
> Dennis
>
>
>
>
>     public void setValueAt(Object value, int rowIndex, int columnIndex){
>   try {
>
>             rowSet.absolute(rowIndex + 1);
>             rowSet.setObject(columnIndex + 1, value);
>             rowSet.updateRow();
>             fireTableCellUpdated(rowIndex, columnIndex);
>             JOptionPane.showMessageDialog(null, "Got here.");
>
>         } catch (SQLException sqle) {
>             do {
>                 System.err.println("Exception occourred\nMessage: "
>                         + sqle.getMessage());
>                 System.err.println("SQL state: " + sqle.getSQLState());
>                 System.err.println("Vendor code: " + sqle.getErrorCode());
>                 System.err.println("---------------------------------");
>             } while ((sqle = sqle.getNextException()) != null);
>         }
>     } 

view thread (2+ messages)

Message-ID: <42E5573F.3020405@gesker.com>
Permalink:  ../42E5573F.3020405@gesker.com/
Also on:    postgresql.org/message-id/42E5573F.3020405@gesker.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: dennis@gesker.com
  Subject: Re: JdbcRowSet Problem
  In-Reply-To: <42E5573F.3020405@gesker.com>
  References: <42E54026.1020506@gesker.com> <42E5573F.3020405@gesker.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox