Asp q & A set

Source: Internet
Author: User
Q: Why does my RecordCount always return-1?
A: You should use this mode to open the record set for database access:
Rec. open strSQL, conn, 1, 1
StrSQL is the SQL statement used to operate the database, and conn is the Connection variable used to connect to the database.
Q: I wrote a lot of comments in the ASP script. Will this affect the server's speed of processing ASP files?
Degree?
A: According to tests by foreign technicians, the overall performance of ASP files with too many comments only drops by 0.1%, that is, the performance of the server is basically not affected.
Q: Do I need to start with an ASP file?
A: If you use VBScript, try not to use this statement. Otherwise, the overall performance of the program will be reduced by nearly 1.2%. However, if you are not using VBScript, use this statement.
Q: Do I need to use "Option Explicit" in every ASP file "?
A: You 'd better do this because it can minimize the chance of program errors and improve the overall performance by nearly 9.8%.
Q: What are the new functions of ASP3.0 that have recently appeared along with IIS5.0?
A: Actually, there are no new changes, but there are two new methods for adding Server objects:
Server. Transfer and Server. Excute, and a new object ASPError. For more information, see www.microsoft.com.
Q: Why does an error occur when I use Response. Redirect?
A: The most common reason is that you have modified the HTTP title after writing the page. The solution is to write the title at the beginning of the page.
Q: It seems that the Redirect method can only Redirect to the same frame. Can it Redirect to another frame?
A: Yes. Add this :. Then, when you use
The Redirect Method will Redirect to the frame named FrameName.
Q: Why does the ASP page of a new Window frequently appear when I use the Window. open () method?
What is Session loss?
A: This problem often occurs in Microsoft IE4.x, but this error has been fixed in IE5.x. Therefore, to be compatible with all browsers, you can use? Name = xxx "is used to pass parameters between windows. This effect is better, but note that if the transmitted parameters are very important, do not use plaintext for transmission, otherwise, security issues may easily occur.
Q: I often see that there are two ways to connect to the database DSN and DSN-LESS, what do they mean? Is there any difference?
A: DSN is the abbreviation of "Data Source Name". The DSN mode is the Data Source connection mode, this Data source can be set in "ODBC Data Sources" in "control panel", and then used as follows:
Conn. Open "DSN = Test; UID = Admin; PWD = ;"

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.