Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / January 2004

Tip: Looking for answers? Try searching our database.

Editing JDBC ResultSets in a JTable

Thread view: 
Marc Dzaebel - 24 Jan 2004 12:57 GMT
Hi,

viewing ResultSets is easy by adapting the TableModel (e.g.
ResultSetTableModel). However, how do I create an *editable* JTable that
accesses its ResultSet directly (updateObject() ... updateRow()) rather than
copies in an array? Do I have to write new CellEditors?

Thank you very much in advance

Marc
Christophe Vanfleteren - 24 Jan 2004 13:04 GMT
> Hi,
>
[quoted text clipped - 6 lines]
>
> Marc

No, you'll need to override the setValueAt() method of the TableModel you're
using to update your ResultSet with the new value.

Signature

Kind regards,
Christophe Vanfleteren

Marc Dzaebel - 24 Jan 2004 17:46 GMT
> No, you'll need to override the setValueAt() method of the TableModel you're
> using to update your ResultSet with the new value.

Hi Christophe,

I already tried this before but now, as you reminded me again, I found that
I did not print the error from updateRow() in setValueAt() and missed the
function. Silly mistake. So you saved me a lot of time! It seems I need the
fix of ConnectorJ 3.1.0 for updatable ResultSets
(http://bugs.mysql.com/bug.php?id=1592)

Thank you very much!

Marc


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.