What is a database connection?
A database connection is a connection that specifies the name, location, and type of database you want to access. There are several types of database connections.
Types of database connections
Set up the connection
A file or folder in the current
web site
Click File or folder in current Web, and then click Browse.
In the Files of type box, select the driver for the type of database you're connecting to.
In the URL box, type the path to the file or folder containing the database, and then click OK. Or, use the Look in box to navigate to the file or folder you want, and then double-click the file or folder in the list.
Click OK to close the New Database Connection dialog box, and then click OK to close the Web Settings dialog box.
Note When you import a Microsoft Access database into your web site, you will be asked to create a database connection to that database and to store the file in the Fpdb folder.
The Fpdb folder has permissions specifying that the folder can't be viewed in a Web browser. To protect the privacy of your database, move it into the Fpdb folder.
A System Data Source Name on a web
server
Only a Eeb server administrator can create a System Data Source Name (System DSN) on a web server. If the server doesn't contain a System DSN for the database you want to access, ask the web server administrator to define one, and to ensure that you are assigned the correct permissions.
Click System data source on web server, and then click Browse.
The System Data Sources On Web Server dialog box is displayed. The list shows the System DSNs defined on the web server.
Select the System DSN for the database you want to access, and then click OK.
Click OK to close the New Database Connection dialog box, and then click OK to close the Web Settings dialog box.
A database server on a network
Click Network connection to database server, and then click Browse.
In the Type of database driver box, select the type of database driver you want to use to connect to the database server.
In the Server name box, type the URL of the network server containing the database you want to access.
In the Database name box, type the name of the database, and then click OK.
Click OK to close the next three dialog boxes.
A database using a custom
definition
Click Custom Definition.
In the Files of type box, select a File DSN, UDL file, or edit a connection string:
To select a File DSN or UDL file in the current web, click Browse. In the URL box, type the path to the File DSN or UDL file you want to connect to, and then click OK. Or, use the Look in box and file list to navigate to the File DSN or UDL file you want, and then double-click the file in the list.
To edit a connection string, click Advanced. In the Connection string box, type the appropriate string to pass to the database driver you want to connect to. Click OK.
Notes
Do not use a File DSN to connect to a database file in the current web; the File DSN will contain file paths that are incorrect for the web server. Instead, create a database connection to a file or folder in the current web.
Any timeouts or other name-value parameters for the database must be contained in the File DSN. If they are not, click Advanced, and then type the appropriate information.
In the Database name box, type the name of the database, and then click OK. The database driver referred to by the File DSN or the connection string must be present on the web server for the connection to work properly.
Click OK to close the next three dialog boxes.
Note To view the data once you set up the connection and complete the steps in the Database Results Wizard, your web site must be hosted or published on a web server configured with:
Ask your Internet service provider (ISP) or web server administrator if your web server is configured with these options.