× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.





Sorry to be such a pest with these keyed files, but I am having a problem again.
I am reading a record from a file, and then immediately updating the record in
the file without changing the contents - just as a test to see if I can update
the record.  It is throwing an exception and giving me the error message:
record: Parameter value is not valid.  What is it trying to tell me?

Here is the code snippet:

try {
              ContlFile.open(AS400File.READ_WRITE, 0,
AS400File.COMMIT_LOCK_LEVEL_NONE);
              Object[] keyObj = new Object[]{new String("SH00001")};
              CNTLRecord = ContlFile.read(keyObj,
com.ibm.as400.access.KeyedFile.KEY_LE);
              if (CNTLRecord != null) {
                   String tempSeqNumber = (String)CNTLRecord.getField("COSEQ");
                   seqNumber = Integer.parseInt(tempSeqNumber);

                   ContlFile.update(keyObj, CNTLRecord);
                   System.out.println("sequence number " + seqNumber);
              }
              ContlFile.close();
          } catch (Exception e) {("sequence
               System.out.println("Problems with the control file " +
e.getMessage()); // this is where it is telling me record: Parameter value is
not valid.
               try {
                ContlFile.close();
              } catch(Exception f) {
            }
          }

Amy




As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 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.