Dreamweaver build Web Query System (2)

Source: Internet
Author: User
Tags format contains query string dreamweaver access root directory
dreamweaver|web| Query System

After the first few sections of the production, the site preparatory work has been preliminarily completed, this section is built to start building 114 of each page. The arrangement of the paging file is

such as:
Top_114.asp: Is the top of all pages, located under the site root directory under the/common folder;
Buttom.htm: Is the bottom of all pages, also located under the site root directory under the/common folder;
The above two files are included in the corresponding page through ASP's include command, so the purpose is to make the website modular and reduce the workload.

Index.asp:114 's homepage
Search.asp: Phone number query results page;
Seek_tel.asp: Query the form, because each page contains the query part, so this section also makes a separate file by other packages

Containing
Login_tel.asp: Fill in the online registration page;
Disp_tele.asp: Display believe the information page, the page contains the telephone number, the number corresponding unit, the unit introduction and so on;
login_ok.asp: Online Fill out the page displayed when the registration is complete;

Here you only need to pay attention to typesetting skills, the others are not too much. In addition, to access these pages in the form of HTTP, you

is http://localhost/114/index.asp to see the homepage.

First, establish a database connection

In the fourth step, our site has been established. Before constructing a dynamic page, we first build and data in the Dreamweaver MX

The connection between libraries, follow these steps:
1. Select the database project in the Application tab and click the Plus button and select "Custom connection string", as shown in Figure 6-1:

2. In the Data Source Settings dialog box, enter the data source name and the connection string, respectively. The connection string is used to connect to the database, where I

First enter in the absolute path format: "Driver={microsoft Access Driver (*.mdb)};d Bq=e:/pcitw/db/cy114db_2004.mdb"
3, here should be noted that all the content within the quotation marks must be written in the format, the database path and file name according to the actual situation

Fill in as shown in Figure 6-2:

After the above 3 steps, the database connection is established. Now look at the database panel, you can display the structure of the database. As shown in Figure 6-3:

The establishment of a database connection essentially creates a connections folder in our root directory and creates a

An ASP file that has the same name as the data source we specified. Familiar with the ASP's friends will be able to see immediately, inside the original is a variable definition. Page is: mm_db114_string = "Driver={microsoft Access driver (*.mdb)};d Bq=e:/pcitw/db/cy114db_2004.mdb" If we

Upload to the site, then this code can be modified, otherwise it is not connected to the database. How to modify, we will explain in the future. As shown in Figure 6-4:

At this point, we have established a connection to the database, any future operations, as long as the database involved, will use the connection just established. Of course, if your site requires a lot of databases, then you will build multiple database connections. Because a connection can only correspond to one database.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.