Continuing this question.
My problem is that I can not edit my JTable. I get an exception and the Object value instead of what I should be seeing.
I am using the ResultSet Table code with a MS-Access database and with a few modifications. My code can be found here. I run into an error when I rs.updateRow() is called. java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Error in row.
I did a google search on this error with updateRow() and not much came up. The only real answer I saw was to use a prepared statement but I am not a pro with SQL commands.
Also a plus if you could tell me the best approach in making this become a GlazedList so I can filter easily. Unless you can provide me something that filters regular JTables easily.
Trying to offer more help since the initial solution didn’t work 100%.
Try the info here: Updatable ResultSets to see how to make your
ResultSetupdatable by specifying arguments when creating aStatementobject from yourConnection. I realized this option may not have been set by default for you. If you driver supports this mode, it should allow the code to work.EDIT:
It’s not necessarily the driver (though you will need a JAR if you wish to change that). You need to enable
ResultSet.TYPE_SCROLL_SENSITIVEwhen creating the table — the driver may still support this mode. There are ways to probe what the JDBC driver supports, but they’re kind of a pain to use unless you use a GUI like SquirrelSQL Client to get a full list of capabilities.