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 */