As discussed in "Creating Connection Strings" in this section, using a system DSN is one way to specify database information in a connection string.
Before you can use a system DSN in a connection string, your administrator must first add it to the ASP Server, as described in "Adding a DSN" in "Chapter 3: Managing Chili!Soft ASP." This saves information on the ASP Server about all of the parameters required for connecting to the database.
Note
Chili!Soft ASP 3.6 installs the ODBC drivers for a number of databases, but it does not support all databases on all platforms. You can view the list of installed drivers in the Installation Requirements topic for your platform in the "Installing and Uninstalling Chili!Soft ASP" section of "Chapter 2: Installing and Configuring Chili!Soft ASP."
Once a system DSN is configured, rather than needing to specify all of the database information in the connection string as you do with DSN-less connection strings, you can simply reference the system DSN name. When you do this, the ASP Server uses the information stored in the system DSN to establish the connection.
Often, all you need to provide in the connection string is the name of the DSN that your system administrator has configured for the database. In this case, use the following syntax:
connect_string = "dsn=[dsn_name]"
where [dsn_name] is the name your system administrator defined for the DSN.
However, if the username and password required for connecting to the database are not specified in the system DSN, you must include them in the connection string. Ask your database administrator for this information. Be sure to use the correct syntax for your type of database, as follows:
connect_string = "dsn=[dsn_name]; UID=[username]; PWD=[password]"
Note
dBase does not require a username and password.
If your system administrator asks you to use file DSNs or DSN-less connection strings rather than system DSNs, see "Using File DSNs" and "Using DSN-less Connection Strings" in this chapter. However, you must use system DSNs for connecting to DB2, Interbase, Microsoft Access, and Microsoft SQL Server 6.5 databases. You cannot use DSN-less connection strings or file DSNs for connecting to these databases.
See also:
Connecting to a Database in this chapter
Using FrontPage Database Features in this chapter
Copyright 2001 Sun Microsystems, Inc. All rights reserved. Legal Notice.