PxPlus User Forum
Main Board => Discussions => Programming => Topic started by: Bob Sosbee 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?
-
Could it be that the file was opened for that object only? I believe that would prevent data access:
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.
-
Yeah, it took some hunting to find where it was open as object. Thanks!