PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Odd error 13 question  (Read 83 times)

Bob Sosbee

  • Member
  • **
  • Posts: 7
    • View Profile
Odd error 13 question
« on: March 08, 2019, 05:27:45 PM »
I'm working in a journal process that I've overridden, and I invoke a method in another object.  The enter list of this function matches, and the data flows through to the new object.  One of these fields is the file channel of the invoice header.  I would expect that I can read the invoice header inside of my function to prefix the data.  On the read however, I get an error 13.  Anything other than FID/FIB/PTH gives me the error 13.  Doing a FID on the file channel passed it is pointing to the correct file.
If I open the same file on another channel, then I can do the read.  If I exit the function the file channel acts normally.  There must be a reason for this behavior.  Does anyone know what it may be?

James Zukowski

  • Gold Member
  • ****
  • Posts: 63
    • View Profile
Re: Odd error 13 question
« Reply #1 on: March 08, 2019, 06:14:25 PM »
Could it be that the file was opened for that object only? I believe that would prevent data access:

Quote
OPEN OBJECT (chan[,fileopt]) [ TABLE ] string$

In Object Oriented Programming, the OPEN OBJECT directive indicates that a file being opened is for the exclusive use of an object. Only the object itself can alter the state of the file, and once the object is deleted, the file is automatically closed. Any external attempt to alter the state of the file returns Error #13: File access mode invalid.

James Zukowski
Programmer / ERP Analyst
Beauty Enterprises, Inc.
150 Meadow St.
Hartford, CT 06114
860.296.9303  Ext 231

Bob Sosbee

  • Member
  • **
  • Posts: 7
    • View Profile
Re: Odd error 13 question
« Reply #2 on: March 15, 2019, 02:19:43 PM »
Yeah, it took some hunting to find where it was open as object.  Thanks!