Share via


Query.Display in Query.java

Note

Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8. Instead, use Windows Search for client side search and Microsoft Search Server Express for server side search.

 

This code segment displays the results of the query. It gets the count of the number of fields in the m_RS Recordset object and then reads through the Recordset object, printing the values of the fields, until it encounters an end of file.

    void Display( PrintStream PS )
...
            int cFields = m_RS.getFields().getCount();

            while ( !m_RS.getEOF() )
            {
                for ( int j = 0; j < cFields; j++ )
                    PS.print( m_RS.getFields().getItem(j).getValue() + "\t" );

                PS.print( "\n" );

                m_RS.moveNext();
            }
...