When running
import java.sql.SQLException;
import javax.sql.RowSet;
import com.sun.rowset.JdbcRowSetImpl;
public class TestRowSet {
public TestRowSet() {
try {
Class.forName("com.mysql.jdbc.Driver");
RowSet rowset = new JdbcRowSetImpl();
rowset.setUrl("jdbc:mysql://localhost/test");
rowset.setUsername("root");
rowset.setPassword("root");
rowset.setCommand("select * from Account");
rowset.execute();
rowset.next();
rowset.setString("password", "password");
rowset.updateRow();
}catch(Exception ex) {
ex.printStackTrace();
}
}
public static void main(String[] args) {
new TestRowSet();
}
}
I get
java.sql.SQLFeatureNotSupportedException: Feature not supported
at com.sun.rowset.JdbcRowSetImpl.setString(Unknown Source)
at TestRowSet.<init>(TestRowSet.java:20)
at TestRowSet.main(TestRowSet.java:29)
I'm using the latest driver. So am i to take from this that RowSet is not fully implemented in the driver and I should just use ResultSet, or is it something else?
Edited by: Alyosha on 08-Mar-2011 01:43