DB Access Class Library for COBOL V1.0 API Reference - Microsoft(R) Windows(R) - - Microsoft(R) Windows NT(R) - - Microsoft(R) Windows(R) 2000 -
Contents Index PreviousNext

UpChapter 4 Examples of Using the DB Access Class Library
Up4.1 Use a Recordset

4.1.1 Create an object of the FJDB-SESSION class


The process of using the DB access class library to manipulate data begins by creating an object of the FJDB-SESSION class, or the top-ranking class of the DB access class library.

To create an object of the FJDB-SESSION class, proceed as follows:


  1. Define the class.

    Define the class to use in the repository paragraph of the configuration section.

     CONFIGURATION SECTION.
     REPOSITORY.
         CLASS FJDB-SESSION
         CLASS FJDB-ERROR.
    
  2. Define variables.

    Define the variables to use in the program.

     WORKING-STORAGE  SECTION.
    *Define object variables
     01  SESSION-A     USAGE OBJECT REFERENCE FJDB-SESSION.
     01  ERROR-A       USAGE OBJECT REFERENCE FJDB-ERROR.
       
  3. Create an object of the FJDB-SESSION class.

    Using a CREATE-OBJECT method, create an object of the FJDB-SESSION class.

          INVOKE FJDB-SESSION "CREATE-OBJECT" USING ERROR-A
                                              RETURNING SESSION-A.

Contents Index PreviousNext

All Rights Reserved, Copyright (C) FUJITSU LIMITED 1998-2000