Eu estou tentanto inserir um registro e acontece o seguinte:
SEVERE: null
org.h2.jdbc.JdbcSQLException: The result set is not updatable. The query must select all columns from a unique key. Only one table may be selected. [90127-113]
at org.h2.message.Message.getSQLException(Message.java:107)
at org.h2.message.Message.getSQLException(Message.java:118)
at org.h2.message.Message.getSQLException(Message.java:77)
at org.h2.message.Message.getSQLException(Message.java:153)
at org.h2.jdbc.JdbcResultSet.getUpdatableRow(JdbcResultSet.java:2914)
at org.h2.jdbc.JdbcResultSet.insertRow(JdbcResultSet.java:2805)
at atletas.dlgPessoa.gravarAtl(dlgPessoa.java:1088)
o erro da quando vai inserir a nova linha no meu Banco de dados:
rs = st.executeQuery("SELECT * FROM ATLETAS;");
rs.moveToInsertRow();
rs.updateInt(1, cod);
rs.updateInt(2, pesCod);
rs.updateInt(3, mod);
rs.updateInt(4, prof);
rs.updateInt(5, cat);
rs.updateString(6, local);
rs.insertRow(); // O ERRO ACONTECE AQUI!!!
rs.moveToCurrentRow();
Alguém sabe me informar que tipo de erro é esse?
e se possivel como resolve-lo