Readnext by.. status() problems (OpenInsight 32-bit Specific)
At 17 NOV 2003 12:26:10PM Gerald Lovel wrote:
The documentation for Readnext…By says that when non-terminating readnexts reach the end of a file, status() is set to indicate this. I bet this documentation hasn't changed since AREV days, and I also bet that it was wrong then too. Here is what really happens, as far as I can determine:
When a file which does not have a QUICKDEX installed is selected without sorting, doing Readnext…By non-terminating sets status() when the EOF is reached.
When a sorted cursor is readnexted, and seeking to the next key involves "going past" the end of the file, status() is set even though the cursor is not exhausted.
When a QUICKDEXED file is readnexted, and the first block of keys is exhausted, the next (meaning, the SAME) block of keys is returned without ever setting status().
I have a very nice simile about programming around these problems, but it is not mentionable in mixed company….
Gerald
glovel@wares.cc