We are having a problem with the following code. moCurrentQuery.hasNext() is not returning false and continuing to loop the resultset indefinetly. Any help is appreiciated.
This is how we are doing in our code:
0. VWQueue.createQuery(null, null, null, VWQueue.QUERY_NO_OPTIONS, filter, subVar, VWFetchType.FETCH_TYPE_WORKOBJ ECT);
1. START OF LOOP
2. if(moCurrentQuery.hasNext()== false)
3. workItem = moCurrentQuery.next();
4. END OF LOOP.
For some reason, this loop is never ending when it starts first time in the day.
For example, if it grabs 100 items, it is looping 100 items again and again. Meaning the pointer of the filenet resultset is being reset to first row. It is never going into the step 2 above and finishing the loop.
Pinned topic moCurrentQuery.hasNext() is not returning false
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2009-02-23T21:00:22Z at 2009-02-23T21:00:22Z by SystemAdmin
Re: moCurrentQuery.hasNext() is not returning false2009-02-19T22:48:23ZThis is the accepted answer. This is the accepted answer.why dont you try the while loop (as shown below) instead of the the if condition within a loop. I dont know if that is the problem, but i used the hasNext() method with the while loop (as shown below) and it works fine for me...
vwQry = vwRoster.createQuery(null,null,null,1,sQueryStr,null,VWFetchType.FETCH_TYPE_WORKOBJECT);
vwElem = (VWWorkObject) vwQry.next();
// other code
Re: moCurrentQuery.hasNext() is not returning false2009-02-23T21:00:22ZThis is the accepted answer. This is the accepted answer.
- SystemAdmin 110000D4XK