Consultor Eletrônico



Kbase P125458: How to connect to schema holder programmatically?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   14/08/2007
Status: Unverified

GOAL:

How to connect to schema holder programmatically?

GOAL:

How to connect to the schema holder without having user name and the password on the pf file?

GOAL:

How to connect to the schema holder with SQL Server authentication without password on the pf file?

FIX:

The following is an example code. You can modify to meet your expectation:

DEFINE VARIABLE cConnString AS CHAR NO-UNDO.
SET cConnString = "-pf <path to pf file including pf file name> -U <user-id> -P <password>".

DO ON STOP UNDO, NEXT:
CONNECT VALUE(cConnString) NO-ERROR.
END.

If NOT CONNECTED("<schema holder name>") THEN
MESSAGE "You are NOT connected"
VIEW-AS ALERT-BOX.
ELSE
MESSAGE "You're connected..."
VIEW-AS ALERT-BOX.