Skip to content

Class: cDB2Handler

Properties | Events | Methods | Index of Classes

Implements functionality specific to DB2.

Hierarchy

cObject > Array > cCLIHandler > cDB2Handler

Show full hierarchy and direct subclasses

Library: Common Class Library

Package: db2_drv.pkg

Description

The cDB2Handler class implements functionality specific to DB2.

Enumerating data sources

Two methods are available to enumerate data sources. They can be used to present lists of available data sources in utilities. A procedure to show all available data sources with comments looks like:

Use DB2_DRV.pkg

Procedure ShowDB2DataSources
    Handle hoDB2Handler
    String sDataSourceAndComment

    Get Create U_cDB2Handler To hoDB2Handler
    If (hoDB2Handler > 0) Begin
        Send SeedDataSources Of hoDB2Handler
        Repeat
            Get DataSources Of hoDB2Handler To sDataSourceAndComment
            Showln sDataSourceAndComment
        Until (sDataSourceAndComment = "")
        Send Destroy Of hoDB2Handler
    End
End_Procedure // ShowDB2DataSources