Consultor Eletrônico



Kbase P19731: Progress loses track of files during a session.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   23/03/2010
Status: Verified

SYMPTOM(s):

Progress loses track of files during a session.

** "<file-name>" was not found. (293)

File was available earlier in the session.

An API call is made before file becomes unavailable.

File is referenced with relative path name.

FACT(s) (Environment):

Progress 9.x
OpenEdge 10.x
Windows

CAUSE:

The API changes the working directory of the session, which causes any relative path reference to become invalid.

This can happen with any API call that occurs in the session, whether it occurs directly (using COM objects or external .dll procedures), or indirectly (when printing to the Adobe PDF writer for example). It is something Progress has no control over, since it occurs at OS level.

FIX:

Before performing the API call(s), obtain and store the full path of the current working directory. See P9229, How to locate the current working directory of a 4GL session? for more details.

After performing the API call(s), set the working directory back to the required path at OS level, using a call to the SetCurrentDirectoryA kernel function. See P9223, How to change the current working directory of a 4GL session? for more details.