Consultor Eletrônico



Kbase P18054: Why does the DBPARAM() function NOT return all the command l
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   02/02/2003
Status: Unverified

GOAL:

Why does the DBPARAM() function NOT return all the command line startup parameters?

FACT(s) (Environment):

Windows 32 Intel

FACT(s) (Environment):

Windows NT 32 Intel/Windows 2000

CAUSE:

The DBPARAM() function returns ONLY the so-called database parameters. It ignores all other parametrs including the -pf parameter.

FIX:

The DBPARAM() function returns the database parameters only. To get the the command line that started the current session, use code similar to:

DEFINE VARIABLE chrCommandLine AS CHARACTER NO-UNDO FORMAT "X(128)".
DEFINE VARIABLE ptrToString AS MEMPTR NO-UNDO.

PROCEDURE GetCommandLineA EXTERNAL "KERNEL32.DLL":
DEFINE RETURN PARAMETER ptrToString AS MEMPTR.
END PROCEDURE.

RUN GetCommandLineA (OUTPUT ptrToString).

DEFINE VARIABLE i AS INTEGER NO-UNDO.
ASSIGN chrCommandLine = GET-STRING(ptrToString,1).

MESSAGE chrCommandLine
VIEW-AS ALERT-BOX INFO BUTTONS OK.