Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- db_VISTA III - d_setdb http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   D_SETDB

SUMMARY
   d_setdb(dbn)
   int dbn;

ARGUMENTS
   dbn         The number of the database to be made current.

DESCRIPTION
   This function sets the number of current database to dbm. All subsequent
   database access will will be applied to the specified database up until
   the next s_setdb callis executed. The number of the database is defined
   by the position of the database name in the database name list passed to
   the d_open function. The first name has database number 0, the second has
   1, and so on. Once d_setdb has been called, it must always be used to set
   the current database. Any dbn passed to the db_VISTA functions will be
   ignored.

CURRENCY CHANGES
   curr_db = dbn;

RETURN CODES

    -4      S_INVDB      Invalid database number.

EXAMPLE
    if (d_open("genledg;acctsrec;acctspay","s") != S_OKAY)
      {
       if (db_status == S_UNAVAL)
           print ("database(s) not currently available \n");
       exit(0);
      }
      d_setdb(1);
      ..
      /* enter account recievable record */
      ..
      d_setdb(0)
      ..
      /* uppdate general ledger */

See Also: d_open

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson