developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks




Max parameter in db.search() in java does strange things...
Stefan Kassal 02/18/2004 05:45 AM
Applications Development 6.5; 6.0.3 Windows 2000; Windows XP


Hello,
I am creating a document collection in java using the search method from database with the parameter for the maximum number of hits.
If I call dc.getCount() I am getting the correct number of documents (50).

When I am iterating through the collection in a while loop with dc.getNextDocument(), the iteration does not stop at 50 document but at 300 which is the number of documents contained in the database.

It seems like a bug to me, so I used a for-loop.
But at the end I want to delete the documents contained in the document collection from the database with dc.removeAll(true)... and guess what... it does not only delete the 50 documents, but all documents in the database.

Has anybody an idea what's going wrong here?

Best regards,
Stefan.

Go back