Using ITDBNameList
The following excerpts from dbname.cpp illustrate the use
of ITDBNameList.
- ITDBNameList::Create() creates an instance
of ITDBNameList that lists the databases from the servers contained
in the DBPATH and INFORMIXSERVER environment
variables.
ITDBNameList dbnl; ITBool created; created = dbnl.Create();
- The database name list is displayed by the ITDBNameList::NextDBName() method.
void DisplayITDBNameList(ITDBNameList &dbname) { ITString str; cout << "Parsing the DBNameList by calling NextDBName() method "<< endl; while (ITString::Null != (str = dbname.NextDBName())) cout << str << "\tALWAYS_DIFFERENT" << endl ; }