Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems


Using System DSNs

As discussed in "Creating Connection Strings" in this chapter, 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 Sun Chili!Soft ASP." This saves information on the ASP Server about all parameters required for connecting to the database.


On UNIX and Linux systems, Sun Chili!Soft ASP installs the ODBC drivers to support a number of databases. However, it does not support all databases on all platforms. To see the list of installed drivers for your platform, go to the platform-specific installation requirements section in "Installing and Uninstalling Sun Chili!Soft ASP" in "Chapter 2: Installing and Configuring Sun 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]"


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 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 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.