Consultor Eletrônico



Kbase P69181: how to check if a database is connected or not?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   2/25/2004
Status: Unverified

GOAL:

how to check if a database is connected or not?

FIX:

The following code attempts to connect to the sports database in multi-user mode and reports whether the client is connected to that database or not:

DEFINE VARIABLE cDBName AS CHARACTER NO-UNDO.

ASSIGN
cDBName = "sports".

CONNECT VALUE(cDBName) NO-ERROR.
MESSAGE CONNECTED(cDBName)
VIEW-AS ALERT-BOX INFO BUTTONS OK.