I am insert a record to MySql using JOOQ , this is my code
if (f.getConnection()!=null) {
UserRecord us = new UserRecord();
us.setAccountId(UInteger.valueOf(accountId));
us.setCode(code);
us.setEnd(new java.sql.Date(end.getTime()));
us.setStart(new java.sql.Date(start.getTime()));
us.setPhoneNumberId(UInteger.valueOf(phnNUmberId));
us.store();
}
(f is database connection factory class)
It gives
Exception in thread "main" org.jooq.exception.DetachedException: Cannot execute
query. No Connection configured
But database connection is nut null , What can be the reason ?
(select queries are working with same connection)