RouteX Document Router Toolkit
Main Functions Types & Errors Query Language Demo Home

rxFindNextQuery

Returns the next query number of the queries you were searching for. Note that you do not have to respecify the query information you are searching for. It is simply giving you the next occurance for the previous search.

When there are no more found queries *Status will be equal to EndOfHitList. Make sure you check not only if *Status is less than zero but also for this constant as it at present is defined as 3. (Since it technically is not an error)

As with rxFindQuery the Query variable will have the information for the found query in it.

Synopsis

ULongT rxFindNextQuery( RouteX Router, rxQueryData *Query, StatusCodeT *Status )

Arguments

Router The RouteX object you are deleting
Query A pointer to a struct of type rxQueryData holding the query information.
 Status A pointer to a value of type StatusCodeT. If an error occurs during the execution of the function a value representing the error will be stored in *Status. You should check *Status after every function call.

Returns

The found query number.

Related Functions

rxAddQuery, rxDeleteQuery, rxFindNextQuery

Example


rxQueryData   aQuery;

unsigned long querynum;



// Set up the query I'm searching for, in this case a 

// name stored in the reference field

strcpy( aQuery.Reference, "Someone");



// set  the other fields to null

aQuery.Action[0] = 0;

aQuery.Title[0] = 0;

aQuery.Query[0] = 0;



querynum = rxFindQuery( Router, &aQuery, Status);



if( *Status < 0 )

   return;



// I now want to delete all records for Someone

while( *Status == 0 ) {



   printf("Deleting query < %s > for %s.\n", aQuery.Title, aQuery.Reference);



   rxDeleteQuery( Router, querynum, Status );

 

   if( *Status < 0 )

      return;



   // note that you don't need to refill out our query terms

   querynum = rxFindNextQuery( Router, &aQuery, Status);  

}

 

Previous Main Next Home

Copyright 2000 Lextek International