Changed the location of query = new OCommand(sql), the PreparedStatement
isClosed() method should return true even if executeQuery is not called.