Feedback
 
Did this article resolve your question/issue?

   

Your feedback is appreciated.

Please tell us how we can make this article more useful. Please provide us a way to contact you, should we need clarification on the feedback provided or if you need further assistance.

Characters Remaining: 1025

 


Article

How to programmatically retrieve the name of all the connected databases?

« Go Back

Information

 
Article Number000021364
EnvironmentProduct: Progress
Version: 9.x
Product: OpenEdge
Version: 10.x, 11.x
OS: All supported platforms
Question/Problem Description
How to get the name of all the connected databases?

How to programmatically retrieve the name of all connected databases?

How to access the currently connected database information with ABL?
Steps to Reproduce
Clarifying Information
Error Message
Defect/Enhancement Number
Cause
Resolution
The following ABL/4GL code example returns the following information from all databases the ABL client is currently connected to:
  • Database logical name
  • Database physical name
  • Database or schema holder logical name
  • Database connection parameters
  • Database type
  • Database version
  • Database unsupported features
  • Database collating sequence
  • Database code page
 
DEFINE VARIABLE i AS INTEGER NO-UNDO.

DO i = 1 TO NUM-DBS:
    MESSAGE
        LDBNAME(i) SKIP /* Database logical name */
        PDBNAME(i) SKIP /* Database physical name */
        SDBNAME(i) SKIP /* Database or schema holder logical name */
        DBPARAM(i) SKIP /* Database connection parameters */
        DBTYPE(i) SKIP  /* Database type */
        DBVERSION(i) SKIP /* Database version */
        DBRESTRICTION(i)SKIP /* Database unsupported features */
        DBCOLLATION(i) SKIP /* Database collating sequence */
        DBCODEPAGE(i) /* Database code page */
        VIEW-AS ALERT-BOX INFO BUTTONS OK.
END.
Workaround
Notes
Attachment 
Last Modified Date10/31/2018 10:27 AM