Olá.
Estou com um problema ao utilizar “Updatable ResultSet” em uma base MySQL. Sempre que executo a lógica abaixo, ocorre o erro :
“com.mysql.jdbc.NotUpdatable: Result Set not updatable.This result set must come from a statement that was created with a result set type of ResultSet.CONCUR_UPDATABLE, the query must select only one table, and must select all primary keys from that table. See the JDBC 2.1 API Specification, section 5.6 for more details.”
A lógica é a seguinte :
try
{
Connection conn = DAOFactory.getDAOFactory
(DAOFactory.DBTYPE).getConnection( );
Statement stmt = conn.createStatement
(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet resultSet = stmt.executeQuery(“SELECT * FROM
operacao_financeira”);
resultSet.moveToInsertRow( );
…
No comando “resultSet.moveToInsertRow( );” ocorre o erro citado.
Como posso resolver ? Qual o erro ??
Obrigado !
Um abraço.
Mauro. 