Home |
Previous Page | Next Page Appendix A. Connecting to Databases >
The DBURL data member of the ConnectionManager class
and the value for the -url option that you
specify for online checking are database URLs.
(For information about online checking, see Online Checking.) Database URLs specify the
subprotocol (the database connectivity mechanism), the database
or server identifier, and a list of properties.
Your Embedded SQLJ program
uses IBM Informix JDBC
Driver to connect to an Informix database. IBM Informix JDBC
Driver supports
database URLs of the following format:
jdbc:informix-sqli://[{ip-address|host-name}:port-number][/dbname]:
INFORMIXSERVER=server-name;[user=user;password=password]
[;name=value[;name=value]...]
In the preceding syntax:
- Curly brackets ( {} ) together with vertical lines ( | ) denote
more than one choice of variable.
- Italics denote a variable value.
- Brackets ( [] ) denote an optional value.
- Words or symbols not enclosed in brackets are required (INFORMIXSERVER=, for example).
Important:
Spaces are not allowed in the database URL.
The following table describes the variable parts of the database URL.
Database URL Variable |
Required? |
Description |
ip-address or
domain-name |
Yes |
The IP address or the
domain name of the computer running the Informix database server
An example of an IP address is 123.45.67.89.
An example of a domain name is myhost.com. |
port-number |
Yes |
The port number of the Informix database server |
dbname |
No |
The name of the Informix database to which you want
to connect
If you do not specify the name of a database, a connection is
made to the Informix database server. |
server-name |
Yes |
The
name of the Informix server to which you want to connect
This is the value of the INFORMIXSERVER environment
variable.
The INFORMIXSERVER environment variable is
required in the database URL, unless it
is included in the property list. |
username |
Yes |
The name of the user you want to connect to the Informix
database or database server as |
password |
Yes |
The password of the user specified by username |
name=value |
No |
A
name-value pair that specifies a value for
the Informix environment variable contained in the name variable,
recognized by either IBM Informix JDBC
Driver or Informix database servers
The value of name is case insensitive.
For information about environment variables supported by IBM Informix JDBC
Driver and how
to set them, refer to the IBM Informix: JDBC Driver Programmer's Guide. |
Home |
[ Top of Page | Previous Page | Next Page | Contents |
Index ]