ASP designs common problem to reach solve essence of life to want - 2
Tuesday, March 03, 2009 by rain
answers:In applying actually,The concept of VBScript variable had blurred,Allow to use variable directly,And need not Dim statement is variable,But this is not a good convention,Cause program error easily,Because the likelihood repeats,define a variable.We can use Option Explicit statement in the program,When using a variable so,Must state first it,If used the variable that states without the course,When moving,The program can make mistake.
carries out a proof,Use in ASP file " Option Explicit " can make the program makes mistake the opportunity falls least,And meet promote whole property greatly.
10, problem:Moving ASP file from time to tome what safety precaution?
answers:ASP offerred very good code to protect a mechanism,All ASP code are carried out in server end and return a client to carry code to carry out a result only.But still do not eliminate baleful personage to be destroyed of the server painstakingly to Web,Should note safe problem more when writing ASP document so.
Although introduces a document in ASP as patulous name with Inc,Still suggest to serve as the patulous name that makes a file with ASP here.When moving on the Web Server with safe bad mechanism when these code,The address that needs to introduce a document in the input on address column only (Inc is patulous name) ,With respect to the content that can browse this to introduce a document,As a result of,this is on Web Server,If do not have a definition very analytic some type (for instance Inc) when the dynamic link library,This file shows with source means.
is additional,Do not put database document in website structure interior,Such,After baleful personage gets database way,Can get this database easily,Then wanton change database content.Better way is,Build DSN of data source name for the database (Date Source Name) ,Stored in DSN about the information that receives the person that appoint data to offer repeatedly,Include:" the physical position of the database,At visitting the type of the driver of the database with,Any other parameter that the driver place that visits a database needs " ,Can visit this DSN directly when undertaking the database is visited.
11, problem:When review Web database runs a system,Should consider what issue?
answers:When evaluating database of a Web to run a system,The issue that must consider tripartite range:Much user problem;Builds Web database should be a relation model;The security problem of the database.
12, problem:What is ADO,It is how operate a database?
answers:The full name of ADO is) of object of data of ActiveX Data Object(ActiveX, the special target market that is a group of optimized visit databases,It offerred complete station to nod database solution for ASP,Its action is carried in the server,Provide the homepage content that contains database information,Through carrying out SQL to command,Let an user be inputted in browser picture,The information that update and deletes site database.
ADO basically includes Connection, recordset and Command three objects, their main function is as follows:
Object of Connection of · :Be in charge of opening or join database file;
Object of Recordset of · :The content that accesses a database;
Object of Command of · :To instruction of inquiry of action of database make known to lower levels,And the memory process of executive SQL Server.
13, problem:Where is the distinction that use Recordset object and Command object will come to visit a database?
answers:Recordset object can ask the database is deferent all data,The bear of the block that the network can create when data bulk is very great so and database server is overweight,Accordingly executive efficiency of whole can be reduced.
Use Command object to call SQL statement directly,Executes operation is in what undertake in database server,Apparent meeting has very tall executive efficiency.Carry out in server end especially establish finished memory process,Can reduce network flow,Additional,Because undertook parse beforehand,The executive efficiency that can improve whole.
14, problem:Whether must establish target of a Connection for each Recordset object?
answers:Can use same Connection target to different Recordset object at the same time,In order to save resource.
15, problem:What is database management system (DBMS) ?
answers:The database agrees to assure to store the safety of the data of amid is mixed,Must a group of softwares finish corresponding administrative job,This group of software are database management system,Abbreviation DBMS,What DBMS follows a system is different and different,But generally speaking,The content that it should include the following fields:
database describes a function:The global logic construction that defines a database,Local and logistic structure and other all sorts of database objects;
database governs a function:Include systematic configuration and management,Data is accessed with newer management,Data integrality management and data security manage;
The inquiry of database and operate function:This function includes to the database retrieves and be revised;
database maintains a function:Include data to introduce derivative managing,Database structure is safeguarded,Data restores function and function to monitor.
to improve the development efficiency of database system,Contemporary database system besides DBMS,The tool that still provided all sorts of support application development.
16, problem:What does the system of WEB database management of current popularity have?
answers:The SQL Server that the Web database of current popularity manages a system to have Microsoft, Oracle, DB2, Sybase,Miniature enterprise uses Access more.