rjorge
asked on
Can I jump to prior position on a CList ?
Greetings,
I have a scenario where I have an outer look , where I iterate through information a result set of A CRecordset open operation and an inner loop, called multiple times per iteration of the outer loop, that also uses a sub-set of this information. In the current implementation I had a different CRecorset object in the function within the inner loop, performing database request for the sub-set of results it required.
For a smart approach I want to perform only the outer query, stuff all the results in an object I can iterate on, and within the loop iterate through the same data set.
However my worry is that after leaving the inner loop I want to have the iterator at the same position as when I entered it. Any suggestions? E.g. saving the POSITION object, returned in the GetNextPos and use the setAt funtion to put the iterator back into it's hold position?
Cheers,
r
I have a scenario where I have an outer look , where I iterate through information a result set of A CRecordset open operation and an inner loop, called multiple times per iteration of the outer loop, that also uses a sub-set of this information. In the current implementation I had a different CRecorset object in the function within the inner loop, performing database request for the sub-set of results it required.
For a smart approach I want to perform only the outer query, stuff all the results in an object I can iterate on, and within the loop iterate through the same data set.
However my worry is that after leaving the inner loop I want to have the iterator at the same position as when I entered it. Any suggestions? E.g. saving the POSITION object, returned in the GetNextPos and use the setAt funtion to put the iterator back into it's hold position?
Cheers,
r
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER