Defining the Informix database interface

To define a connection through an Informix database interface, you must create a database profile by supplying values for at least the basic connection parameters in the Database Profile Setup dialog box for Informix IN9 or I10. You can then select this profile at any time to connect to your database in the development environment.

For information on how to define a database profile, see Using database profiles.

Specifying the server name

When you specify the server name value, you must use the following format to connect to the database through the Informix interfaces:

host_name@server_name

Parameter

Description

host_name

The name of the host computer running the Informix database server. This corresponds to the Informix HOSTNAME environment variable.

server_name

The name of the server containing the Informix database. This corresponds to the Informix SERVER environment variable.


For example, to use a PowerBuilder native interface to connect to an Informix database server named server01 running on a host machine named sales, do either of the following:

  • In a database profile

    Type the host name (sales) in the Host Name box and the server name (server01) in the Server box on the Connection tab in the Database Profile Setup dialog box. PowerBuilder saves this server name as sales@server01 in the database profile entry in the system registry.

  • In a PowerBuilder script

    Type the following in your PowerBuilder application script:

    SQLCA.ServerName = "sales@server01"

    Tip

    If you specify a value for Host Name and Server in your database profile, this syntax displays on the Preview tab in the Database Profile Setup dialog box. You can then copy the syntax from the Preview tab into your script.