UCanAccess uses HSQLDB as a "backing database", and HSQLDB requires that all columns in the insert row be given an explicit value before calling .insertRow(), including using rs.updateNull("ColumnName") to explicitly specify a NULL value. That's just the way it works.
This was previously discussed on this forum in this thread.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, I confirm what Gord states.
But some complaints has been raised about this current behaviour and I can do something before redirecting to HSQLDB.
They say the implentation of this feature in other drivers for other dbms is simpler for use. So, in the next release, I'll change this behaviour so that you're no more forced to explicitly set the values of all columns (i.e., the null values).
Cheers Marco
Last edit: Marco Amadei 2015-03-16
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am getting an error "nullnet.ucanaccess.jdbc.UcanaccessSQLException: invalid cursor state: all column must be set before insert"
here is my code
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
Connect("net.ucanaccess.jdbc.UcanaccessDriver","jdbc:ucanaccess://D:/chatBase.mdb","","");
UCanAccess uses HSQLDB as a "backing database", and HSQLDB requires that all columns in the insert row be given an explicit value before calling
.insertRow(), including usingrs.updateNull("ColumnName")to explicitly specify a NULL value. That's just the way it works.This was previously discussed on this forum in this thread.
Yes, I confirm what Gord states.
But some complaints has been raised about this current behaviour and I can do something before redirecting to HSQLDB.
They say the implentation of this feature in other drivers for other dbms is simpler for use. So, in the next release, I'll change this behaviour so that you're no more forced to explicitly set the values of all columns (i.e., the null values).
Cheers Marco
Last edit: Marco Amadei 2015-03-16