The ITDBInfo class
Base class: ITErrorManager
Sets or returns information about connections to HCL Informix® databases (such as the user, database, system, and password). When an ITDBInfo is used to open a connection, the ITDBInfo becomes frozen and cannot be modified by using the Set calls.
This class provides the following methods.
Method | Description |
---|---|
ITDBInfo() | Constructs an ITDBInfo object for the system environment of the user. |
ITDBInfo(const ITDBInfo &) | Copy constructor. The ITDBInfo copy constructor makes a deep copy rather than a shallow copy. The new ITDBInfo object is thawed and can be modified by using the Set calls. |
ITDBInfo(const ITString &db, const ITString &user = ITString(), const ITString &system = ITString(), const ITString &passwd = ITString()); | Constructs ITDBInfo and sets system database and
user information. This method has these parameters:
|
ITBool operator==(const ITDBInfo &) const; | Compares the instances of the ITDBInfo objects. |
ITBool Frozen() const | Returns TRUE if the information of this database object is frozen, or FALSE if the information is not frozen. |
ITBool Freeze() | Freezes the database information of the object. |
ITBool CreateDatabase (int flags = ITDBInfo::Default, const ITString &dbspace = ITString::Null) | Creates the database; returns TRUE if
the database was successfully created, FALSE if it was
not. The database name and server name are taken from ITDBInfo.
The
following values are valid for type:
|
ITBool DropDatabase() | Drops the database; returns TRUE if the database was successfully dropped, FALSE if it was not. |
ITBool SetUser(const ITString &) | Sets the user name. |
ITBool SetDatabase(const ITString &) | Sets the database name. |
ITBool SetSystem(const ITString &) | Sets the system name. |
ITBool SetPassword(const ITString &) | Sets the password. |
const ITString &GetUser() const | Returns the user name. |
const ITString &GetDBLocaleName() const | Returns the database locale name. |
const ITString &GetSystem() const | Returns the system name. |
const ITString &GetDatabase() const | Returns the database name. |