2006-06-15 17:02:06 UTC
This is in the FAQ and might help...
6. I'm having trouble getting SwingSet to work with MySQL. Are there any
special instructions?
Yes. The mysql-connector-java MySQL driver has a unique ResultSet
implementation. The default ResultSet is not updatable so an
UpdatableResultSet is needed for creating updatable GUI's with SwingSet.
Rather than creating a RowSet using a connection string and query,
the developer should instantiate their RowSet with an UpdatableResultSet.
In addition, since there is no connection string or query, the
SSDataNavigator needs to be explicitly told not to call the execute()
method of RowSet and to assume that the RowSet already contains the query
results. This is done with the setCallExecute() method.
Example:
Let rs be your UpdatableResultSet object.
JdbcRowSetImpl rowset = new JdbcRowSetImpl(rs);
SSDataNavigator dataNavigator = new SSDataNavigator();
dataNavigator.setCallExecute(false);
dataNavigator.setRowSet(rowset);
If you want to change the query, change the rs object as needed,
re-instantiate your RowSet, and re-call the setRowSet method of your
SSDataNavigator.
(P.S.: This is a work around provided for MySQL DB users based on the
feedback from lopes. See
http://sourceforge.net/forum/forum.php?thread_id=1005899&forum_id=313186)