Essentials of ASP Design FAQ and Solutions (II.)

Source: Internet
Author: User
Tags define dsn execution microsoft sql server web database

9. Question: Is it necessary for me to use option Explicit in each ASP file?

A: In practice, the concept of VBScript variables is blurred, allowing direct use of variables without the dim declaration of variables, but this is not a good habit, it is easy to cause a program error, because it is possible to repeatedly define a variable. We can use the Option Explicit statement in a program so that when you use a variable, you must declare it, and if you use a variable that is not declared, the program will run into error.

It has been proved that using option Explicit in ASP files can minimize the chance of program error and greatly improve overall performance.

10. Question: What security measures are there when running ASP files?

A: ASP provides a good code protection mechanism, all ASP code is executed on the server side and only returned to the client code execution results. However, the malicious person does not rule out the deliberate destruction of the Web server, so you should pay more attention to security issues when writing ASP files.

Although the introduction of files in ASP as an extension of INC, ASP is still recommended as the extension of the primer file. When this code is running on a poorly secured Web server, you can browse the contents of the introduced file by simply entering the address of the address bar that introduces the file (inc), because on the Web server, if you do not have a dynamic connection library defined to resolve a type, such as Inc, The file is displayed in Source mode.

In addition, do not put the database files within the structure of the site, so that when the malicious person to obtain the database path, you can easily access the database, and then arbitrarily change the database content. It is a good practice to establish a data source name DSN (date source name) for the database, where information about connecting to the specified data provider is stored in the DSN, including: "The physical location of the database, the type of driver used to access the database, Any additional parameters required to access the database driver, which can be accessed directly from database access.

11. Question: When evaluating the Web database management system, what problems should be considered?

A: When evaluating a Web database management system, three aspects must be taken into account: multiuser problem; The web database should be a relational type; security of the database.
12. Question: What is ADO, and how does it operate the database?

A: The full name of ADO is the ActiveX Data Object (ActiveX), an optimized set of dedicated objects to access the database, providing a complete site database solution for the ASP, which functions on the server side, providing the homepage content containing the database information, By executing SQL commands, users are allowed to enter, update, and delete site database information in the browser screen.

ADO mainly includes the Connection,recordset and command three objects, their main functions are as follows:

· Connection object: Responsible for opening or connecting to the database file;
· Recordset object: Accessing the contents of the database;
· Command object: To assign an action query directive to a database, and to execute a stored procedure for SQL Server.

13. Question: What is the difference between using a Recordset object and a Command object to access a database?

A: The Recordset object will require the database to transfer all the data, then the large amount of data will cause network congestion and the database server overload, so the overall implementation efficiency will be reduced.
Using the Command object to invoke the SQL statement directly, the operations performed are performed on the database server, and are clearly highly efficient. Especially on the server side to perform the creation of completed stored procedures, can reduce network traffic, in addition, due to the prior syntax analysis, can improve the overall efficiency of execution.

14. Question: Do I have to create a connection object for each Recordset object?

A: You can save resources by using the same connection object for different Recordset objects at the same time.

15. Question: What is a database management system (DBMS)?

A: Database in order to ensure that the data stored in the security and consistency, there must be a group of software to complete the corresponding management tasks, this group of software is a database management system, referred to as Dbms,dbms with the different system, but generally speaking, it should include the following aspects:

Database Description Function: Define the global logical structure of the database, local logic structure and other kinds of database objects;
Database management functions: including system configuration and management, data access and update management, data integrity management and data security management;
database query and Manipulation functions: This function includes database retrieval and modification;
Database maintenance functions: including data introduction and extraction management, database structure maintenance, data recovery function and performance monitoring.

In order to improve the efficiency of database system development, modern database system, in addition to DBMS, also provides a variety of tools to support application development.

16, the question: What is the current popular web database management system?

A: The current popular web database management system has Microsoft SQL Server, Oracle, DB2, Sybase, small scale enterprises to use Access more.

Related Article

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.