code: protected ResultSet findNodesAndProperties(String lastNodeId, int offset, int limit) throws SQLException
     {
        String tempTableAName = "tempdb..a" + IdGenerator.generate();
  
        boolean tempTableACreated = false;
  
        try
        {
           // the Sybase is not allowed DDL query (CREATE TABLE, DROP TABLE, etc. ) within a multi-statement transaction
           if (!dbConnection.getAutoCommit())
           {
              dbConnection.setAutoCommit(true);
           }
  
           selectLimitOffsetNodesIntoTemporaryTable =
              dbConnection.prepareStatement(SELECT_LIMIT_OFFSET_NODES_INTO_TEMPORARY_TABLE.replaceAll(
                 SybaseJDBCConnectionHelper.TEMP_A_TABLE_NAME, tempTableAName).replace("${TOP}",
                    new Integer(offset + limit).toString()));
  
           if (findNodesAndProperties != null)
           {
              findNodesAndProperties.close();
           }
  
           findNodesAndProperties =
              dbConnection.prepareStatement(FIND_NODES_AND_PROPERTIES.replaceAll(
                 SybaseJDBCConnectionHelper.TEMP_A_TABLE_NAME, tempTableAName));
  
           deleteTemporaryTableA =
              dbConnection.prepareStatement(DELETE_TEMPORARY_TABLE_A.replaceAll(
                 SybaseJDBCConnectionHelper.TEMP_A_TABLE_NAME, tempTableAName));
  
           selectLimitOffsetNodesIntoTemporaryTable.setString(1, this.containerConfig.containerName);
           selectLimitOffsetNodesIntoTemporaryTable.setString(2, getInternalId(lastNodeId));
           selectLimitOffsetNodesIntoTemporaryTable.execute();
  
           tempTableACreated = true;
  
           findNodesAndProperties.setString(1, this.containerConfig.containerName);
  
           return findNodesAndProperties.executeQuery();
        }
        finally
        {
           if (tempTableACreated)
           {
              try
              {
                 deleteTemporaryTableA.execute();
              }
              catch (SQLException e)
              {
                 LOG.warn("Can not delete temporary table " + tempTableAName);
              }
           }
  
  
           // close prepared statement since we always create new
           if (selectLimitOffsetNodesIntoTemporaryTable != null)
           {
              selectLimitOffsetNodesIntoTemporaryTable.close();
           }
  
           if (deleteTemporaryTableA != null)
           {
              deleteTemporaryTableA.close();
           }
        }
     }
docs: {@inheritDoc}