Create connections

To specify connection parameters (system, database, user name, and password) when creating a connection, your application creates an instance of the ITDBInfo class. If the application uses the default connection parameters, you can create a connection without the use an instance of the ITDBInfo class.

After an ITDBInfo variable is constructed, it can be used to establish multiple database connections. However, after a connection has been established by using a given ITDBInfo, that instance of ITDBInfo cannot be changed, nor can any copy of it be modified. The ITDBInfo instance is said to be frozen. To detect whether an ITDBInfo object has been frozen, use the ITDBInfo::Frozen() method.

The default user name and password are those of the current user. The default database name is the name of the current user. The default server name is specified in the UNIX™ $INFORMIXSERVER environment variable or in the Windows™ registry. If the ITDBInfo instance is not frozen, you can modify these values with the ITDBInfo::SetDatabase(), ITDBInfo::SetUser(), ITDBInfo::SetPassword(), and ITDBInfo::SetSystem() methods.