Sun
ONE Active Server Pages Product Home Page Developer Site Version
 

ContentsPreviousNextIndex



Connecting to a Database


This section takes you through the two basic steps required for connecting to a database from an ASP page: creating a connection string, and opening a database connection. This section also explains how to use FrontPage database features with Sun ONE Active Server Pages, and how to migrate a Microsoft Access database running on a Windows-based computer to a MySQL or dBASE database running on a UNIX or Linux system (detailed information about migrating an Access database to MySQL is also provided in Using Database Tools).

A connection string provides information required by the Sun ONE ASP Server to establish the connection. Within a connection string, you can use one of three ways to specify information about a database, as described later in this section: a system DSN, a DSN-less connection string, and a file DSN.

A database connection is opened by using the ADO Connection object included with Sun ONE ASP. You can then use other ADO objects to display and manipulate data on the ASP page. For more information about using ADO objects, see ADO Component Reference.

Note icon Note If you are going to pass data exceeding 64,000 bytes to a database, your system administrator should increase the maxlongfieldlength parameter for ADO, as described in Editing the Sun ONE ASP Configuration File (see the [ADO] keyword).

In this section:

Creating Connection Strings

Opening the Database Connection

Using FrontPage Database Features

Migrating an Access Database to MySQL or dBASE



ContentsPreviousNextIndex