INFORMIX
DataBlade API Programmer's Manual
Chapter 5: Managing Sessions
Home Contents Index Master Index New Book

System Defaults

If a parameter described in an information structure is not set, the defaults are as follows.

Environment Variable Type Structure Member

SERVERNUM

integer

MI_CONNECTION_INFO.server_port

INFORMIXSERVER

string

MI_CONNECTION_INFO.server_name

Example: set_defaults

The following example shows one way to set defaults. Assume that the system parameter file sets the default database server to joe, the default database to test, and the default user to tester. Also assume that a particular application must connect to database server beth as user miadmin and open the template1 database every time it starts. To do this, the application sets its own default information structures, as the following code fragment illustrates. After setting the default connection with mi_set_default_connection_info() and the default database and user with mi_set_default_database_info(), the application makes the connection with mi_server_connect() and opens the database with mi_login(). (For a description of the all_callback() function, see "Callback Example".)

You can also use the following functions to get the system parameters from the application:

For complete descriptions of these functions, see Chapter 12, "DataBlade API Function Descriptions."




DataBlade API Programmer's Manual, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.