Internet/intranet Programming FAQ for ASP

Source: Internet
Author: User
Tags odbc
It is very convenient to develop MIS system on internet/intranet based on ASP technology, first of all, it borrows ADO technology and concept, and accesses database through ODBC, and achieves full flexibility and multi-platform, in addition, because of ASP using VBS and JS scripting language, It also ensures that most developers quickly enter the development process and reduce the learning process.
However, because the ASP is based on the Internet/intranet way, it and the traditional C/s structure is different after all, so in the development of the attention of some details. This article describes some of the common problems and gives a solution.
Problem description
A. Unable to run ASP correctly
When we have created an ASP file, and the syntax is in place, enter the following address through the browser, or open browsing through the Explorer:
C:inetpubwwwroota.asp
An error that cannot be run is prompted and the permissions are not correct or the file is inaccessible because the ASP file first requires the site to have the Execute (script) attribute, and then requires that the address be entered in the URL format instead of the DOS format, so please correct both errors.
B. The database cannot be accessed after the program moves location
This error is first in ODBC, if the ODBC data source is set correctly, then you need to be aware of the command to open the database in asp: Conn.Open parameters are correct. If correct, you need to be aware of using the Global.asa file, which is the configuration file for the ASP connection database, which reads as follows:
<script language= "VBScript" runat= "Server" >
' Can add special event handlers in this file ' would get run automatically when special Active Server Pages Events
' occur. To create this handlers, just create a subroutine with a name from the ' list below that ' corresponds to the event
' You want to use. For example, to create a event handler for Session_OnStart, your would put the "following code into"
' File (without the comments):
' EventName Description
' Session_OnStart runs the ' A user runs any page in your application
' Session_OnEnd runs when a user's session times out or quits your application
' Application_OnStart runs once when the ' the ' the ' the ' the ' the ' the ' the ' the ' the ', '
' Application_OnEnd runs once the Web server shuts down
</SCRIPT>
<script Language=vbscript runat=server>
Sub Session_OnStart
' ==visual InterDev generated-dataconnection startspan==
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.