Kbase P102735: AppServer CONNECT() method fails with error 1247
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  02/11/2005 |
|
Status: Unverified
SYMPTOM(s):
Unable to open parameter file <name>, errno <number>. (1247)
If the SEARCH() function is used to find a .pf file, the AppServer CONNECT() method will fail if the path contains spaces.
See following example:
DEF VAR pf_Path AS CHAR.
DEF VAR lOk AS LOG.
pf_Path = "-pf ":U + SEARCH( "appserver.pf":U ) .
lOk = hAppServer:CONNECT( pf_Path ) NO-ERROR.
CAUSE:
The string returned by the SEARCH() does not contain quotes.
The CONNECT function needs a quoted string as input. Otherwise the path will be truncated at the first space it finds (i.e. "C:\Program Files" becomes "C:\Program").
FIX:
Use the QUOTER() function to put quotes around the string:
QUOTER(SEARCH( "appserver.pf":U )).