Xiayi
ASP Dynamic Web site development technology
With the deepening of people's understanding of the Internet and the development of IT technology, static Web pages have become more and more unable to meet the needs of information interaction and e-commerce, so it is a trend to develop web pages that can realize information interaction and personalized service with database as the core. In order to meet the trend of dynamic Interactive Web page development, there are web development technologies that can interact with the backstage database, and the most popular one is the ASP (Active Server Pages) technology based on the Microsoft Windows platform IIS. It embeds specific scripting languages such as VBScript and JavaScript into HTML, and when the browser is requested, the Web server uses the corresponding script interpretation engine to interpret the script, complete the query, modify, and so on. The results are dynamically formatted into HTML and sent back to the browser request side.
Oracle database is the most commonly used database at home and abroad, with the release of Oracle 8i, it adds to the Java and object support, greatly facilitates the development of network software. Therefore, the development of ASP applications in many cases needs to deal with the background Oracle database. Below, we will take the application of several panels as an example, highlighting how ASP scripts can access the stored procedures of the database using the Command object of the ADO component.
The information submitted by the Multiple panel users is uniformly stored in the database tables in the following structure:
CREATE TABLE Messages (
m_id number,
M_forumname varchar2 () not NULL,
M_subject varchar2 () not NULL,
M_username varchar2 () not NULL,
M_email varchar2 () not NULL,
M_entrydate Date Default Sysdate,
M_message VARCHAR2 (200),
M_ordernum number,
m_reply number);
The meanings of each of these fields are as follows:
M_ID: The identification number uniquely identified by each message;
M_forumname: Discussion topic title;
M_subject: Message subject;
M_username: User name;
M_email:e-mail address;
M_entrydate: Submission time;
M_message: Message content;
M_ordernum: Sequence number;
M_reply: Is the answer message.
Two, ASP script calls the stored procedure in Oracle database package
1. Create a database package
Assuming that there are several thematic discussions already in the database table, and if you want to display the names of each topic and the number of messages on each topic separately on the page, first define a stored procedure named Getforum in the Oracle database and place it in a package named Forum_retrieve.
If the stored procedure returns a multiline dataset, the procedure must be placed in a package. A package is an object of an Oracle database that encapsulates data types, stored procedures, functions, variables, and constants, similar to the standard code modules in VB. The package is divided into two parts of Baotou and the package separately, so the two parts should be established separately, and Baotou is used to define the elements that can be referenced externally, and the package body defines the actual code, that is, the logical execution part.
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.