I'm trying to execute the following method
String sqlQuery = "UPDATE ACCOUNTS"
+ " SET LAST_LOGIN_DATE=LOGIN_DATE,"
+ " LOGIN_DATE=SYSTIMESTAMP"
+ " WHERE CUSTOMER_ID=? AND USER_ID=?";
logger.debug("[{}] sqlQuery={}", methodName, sqlQuery);
String connectionName = properties.getProperty(JNDI_NAME);
Connection connection = null;
PreparedStatement pstmt = null;
connection = getJNDIConnection(connectionName);
pstmt = connection.prepareStatement(sqlQuery);
// set the input parameters
pstmt.setString(1, customerId);
pstmt.setString(2, userId);
if (pstmt.executeUpdate() > 0)
When I get to the last line it gives me false and the query is not executed. Please, help