Show All

Create a database connection

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

  1. Start the Database Results Wizard (on the Insert menu, point to Database, and then click Results).
  2. Click Use a new database connection, and then click Create
  3. Click Add, and then type a name for the new database connection in the Name box.
  4. Under Type of connection, choose one of the following types of connections:

A file or folder in the current web site

  1. Click File or folder in current Web, and then click Browse.

  2. In the Files of type box, select the driver for the type of database you're connecting to.

  3. 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.

  4. 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.

  1. 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.

  2. Select the System DSN for the database you want to access, and then click OK.

  3. 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

  1. Click Network connection to database server, and then click Browse.

  2. In the Type of database driver box, select the type of database driver you want to use to connect to the database server.

  3. In the Server name box, type the URL of the network server containing the database you want to access.

  4. In the Database name box, type the name of the database, and then click OK.

  5. Click OK to close the next three dialog boxes. 

A database using a custom definition

  1. Click Custom Definition.

  2. In the Files of type box, select a File DSN, UDL file, or edit a connection string:

  3. 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.

  4. 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.