|
The following table lists the parameters you must define in a file DSN for each type of database. In each case, use the driver name for your database that is provided in the table.
Database Type |
Parameters |
DB2 |
Driver={DB2} IP=[ip_address] Port=[port_number] Database=[database_name] UID=[username] PWD=[password] where [ip_address] is the IP address of the database server, [port_number] is the port for the database server, [database_name] is the name of the database, and [username] and [password] are the username and password required for accessing the database. |
dBASE 5 |
Driver={Dbase} DBQ=[pathname] defaultDir=[default_directory] where [pathname] is the absolute path name of the directory containing the database file and [default_directory] is the default directory for the database. |
Informix 7, 9 |
Driver={Informix} Server=[server_name] Database=[database_name] UID=[username] PWD=[password] where [server_name] is the name of the database server, [database_name] is the name of the database, and [username] and [password] are the username and password required for accessing the database. |
Informix 2000 |
Driver={Informix} HostName=[host_name] Server=[server_name] Port=[port_number] Database=[database_name] UID=[username] PWD=[password] where [host_name] is the name of the computer on which the database server resides, [server_name] is the name of the database server as it appears in the sqlhosts file, [port_number] is the port on which the database server is configured to listen, [database_name] is the name of the database, and [username] and [password] are the username and password required for accessing the database. |
Microsoft Access |
DSN-less connection strings and file DSNs are not supported for Microsoft Access databases. You must use system DSNs. |
Microsoft SQL Server 6.5 |
DSN-less connection strings and file DSNs are not supported for Microsoft SQL Server 6.5 databases. You must use system DSNs. |
Microsoft SQL Server 7.0 and 2000 |
Driver={SQL Server} Address=[ip_address],[port_number] Database=[database_name] UID=[username] PWD=[password] where [database_name] is the name of the database; [ip_address],[port_number] is the IP address of the database server and the port on which the database server is configured to listen, and [username] and [password] are the username and password required for accessing the database. |
MySQL |
Driver={Mysql} Server=[server_name] Database=[database_name] UID=[username] PWD=[password] where [server_name] is the name of the database server, [database_name] is the name of the database, and [username] and [password] are the username and password required for accessing the database. |
Oracle 7, 8 |
Driver={Oracle} Server=[TNS_name] UID=[username] PWD=[password] where [TNS_name] is the TNS name as defined in the tnsnames.ora file, and [username] and [password] are the username and password required for accessing the database. |
Oracle 8i, 9i |
Driver={Oracle} Host=[host_name] Port=[port_number] SID=[oracle_SID] Server=[TNS_name] UID=[username] PWD=[password] where [host_name] is the computer on which the database server resides, [port_number] is the port on which the database server is configured to listen, [oracle_SID] is the Oracle System Identifier that refers to the instance of Oracle running on the server, and [username] and [password] are the username and password required for accessing the database. |
PostgreSQL |
Driver={Postgres} Server=[server_name] Port=[port_number] Database=[database_name] UID=[username] PWD=[password] where [server_name] is the name of the database server, [port_number] is the port on which the database server is configured to listen, [database_name] is the name of the database, and [username] and [password] are the username and password required for accessing the database. |
Sybase |
Driver={Sybase} NetworkAddress=[host_name],[port_number] Database=[database_name] UID=[username] PWD=[password] where [host_name],[port_number] is the IP address of the database server and the port on which the database server is configured to listen, [database_name] is the name of the database,; and [username] and [password] are the username and password required for accessing the database. |
Text |
Driver={Text} Database=[database_name] where [database_location] is the directory in which the text files are stored. |
See also:
Using File DSNs in this chapter
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.