Posted by Jeff Cinelli on October 25, 2004 at 04:06:27:
We converted our Comet file system to CFAM over the weekend. We are now encountering a problem with the KEY function. When opening a KEYED file with no records, and attempting to do a KEY function, instead of returning an end-of-file exception, Comet instead is returning the name of the next file in the directory.
Directory Contents:
FILEA
FILEB
FILEC
FILED
Program (Assuming FILEB is a keyed file with no records)
CLOSE (1) & OPEN (1) FILEB
KEY$=KEY(1)
PRINT KEY$
Executing this program will print "FILEC", instead of generating an error.
If the file has at least 1 record in it, the EOF function DOES work properly when you do KEY's and READ'S/INQUIRE's through the file. However if the file is empty, its a problem.