ASP design FAQ and answer esquire (2)

zhaozj2021-02-16  51

ASP design FAQ and Solution Fine 2

9. Question: Is there any "option explicit" in every ASP file?

A: In practical applications, the concept of VBScript variables has been blurred, allowing the variables to be used directly without using the DIM declaration variable, but this is not a good habit, which is easy to cause the program error because it may be repeatedly defined. We can use the Option Explicit statement in the program so that when you use a variable, we must first declare it. If you use the declared variables, the program will be wrong when running.

Practice proves that "Option Explicit" in ASP files can make program error chances to minimize and will greatly improve overall performance.

10. Problem: What safety measures do you have when running an ASP file?

A: ASP provides a good code protection mechanism, all ASP code executes only to the client code execution results in the server side. But still do not exclude malicious people deliberately destroying the web server, so pay more attention to security issues when writing ASP files.

Although the file is introduced into INC as an extension in the ASP, it is still recommended to use ASP as an extension of the lead file. When these codes run on the Web Server in the security mechanism, simply enter the address of the introduction file on the address bar (INC extension), you can browse the contents of the introduction file, which is due to the Web Server, This file is displayed in the source code if it is not defined to parse a type of (e.g., INC) dynamic connection library.

Also, don't put the database file inside the site structure, so that after the malicious person gets the database path, you can easily get the database, and then change the database content. A preferred approach is to establish a data source name DSN (Date Source Name) for the database, store information about connecting to the specified data provider, including: "database, the physical location of the database, is used to access the database for the driver of the database. Any other parameters required to access the database driver ", you can directly access the DSN directly when database access is performed.

11, Question: What should I consider when a Web database management system?

A: When evaluating a web database management system, you must take into account the three aspects: multi-user problem; the established web database should be a relational; database security issues.

12. Question: What is ADO? How is it operating the database?

A: ADO's full name is ActiveX Data Object (ActiveX data object), is an optimized access to a dedicated object set, which provides a complete site database solution for ASP, which function on the server, providing database information Home content, by executing the SQL command, let the user enter, update, and delete the information of the site database in the browser screen.

ADO mainly includes three objects of Connection, Recordset, and Command, which are as follows:

• Connection object: Responsible for opening or connecting to a database file;

· RECORDSET object: Access the content of the database;

· Command object: Database Database Decoction Query Instruction, and the stored procedure for executing SQL Server.

13. Problem: Where is the difference between using the RecordSet object and the Command object to access the database?

A: The Recordset object requires the database to transfer all the data, then the amount of data will cause the network blocking and the load limit of the database server, so the overall execution efficiency will decrease. The SQL statement is called directly using the Command object, and the operation performed is done in the database server, apparently there will be high execution efficiency. Especially in the server-side stored stored procedures, the network traffic can be reduced, and the overall execution efficiency can be improved due to the prior grammatical analysis.

14. Problem: Do you have to create a Connection object for each RecordSet object?

A: You can use the same Connection object on different Recordset objects at the same time to save resources.

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

A: Database To ensure the security and consistency of the data stored, a set of software must have a software to complete the corresponding management task, this group of software is the database management system, referred to as DBMS, DBMS varies from the system, but in general, It should include the following aspects:

Database Description Features: Define the global logical structure, local logical structure, and other database objects for the database;

Database management features: including system configuration and management, data access and update management, data integrity management, data security management;

Query and manipulation of databases: This feature includes database retrieval and modification;

Database maintenance features: including data introduction lead management, database structural maintenance, data recovery function, and performance monitoring.

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

16. Problem: What are the current popular web database management systems?

A: The current popular

Web

The database management system has Microsoft

SQL Server

,

Oracle

,

DB2

,

Sybase

, Small-scale enterprises

ACCESS

.

转载请注明原文地址:https://www.9cbs.com/read-23265.html

New Post(0)