|
hi,
i'm trying to read a file with a key. there is no problem if i try to read some
records in the middle of the file. but if i want the first record i get the
following error:
class com.ibm.as400.access.AS400Exception : CPF5001 null
i'm using the method: keyedfile.positionCursorBefore(key,numberOfKeys)
i don't get the error if i use the method:
keyedfile.positionCursor(key,numberOfKeys)
but then i don't get the first record cause i use the method:
keyedfile.readNextEqual(key,numberOfKeys)
could someone please tell me how to get the records correctly?
i'm using jtopen 3.1 .
my code looks like this:
file.positionCursorBefore(key,numKeys);
while ((record = file.readNextEqual(key,numKeys)) != null)
{
vector.addElement(record);
}
thanx in advance
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.