|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
Access是一种桌面数据库,只适合数据量少的应用,在处理少量数据和单机访问的数据库时是很好的,效率也很高。但是它的同时访问客户端不能多于4个。access数据库有一定的极限,如果数据达到100M左右,很容易造成服务器iis假死,或者消耗掉服务器的内存导致服务器崩溃。初学|毛病ASP中查错之实例
有如许一个程序,是对Application汇合中的元素举行举动的增加与删除,程序以下:
<%@LANGUAGE=VBSCRIPT%>
<HTML>
<HEAD>
<TITLE>TheApplicationObject</TITLE>
<STYLETYPE="text/CSS">
BODY{font-family:Tahoma,Arial,sans-serif;font-size:10pt}
INPUT{font-family:Tahoma,Arial,sans-serif;font-size:9pt}
.heading{font-family:Tahoma,Arial,sans-serif;font-size:14pt;font-weight:bold}
.subhead{font-family:Tahoma,Arial,sans-serif;font-size:12pt;font-weight:bold;padding-bottom:5px}
.cite{font-family:Tahoma,Arial,sans-serif;font-size:8pt}
</STYLE>
</HEAD>
<BODYBGCOLOR="#FFFFFF">
<SPANCLASS="heading">TheASPApplicationObject</SPAN><HR>
<!--------------------------------------------------------------------------->
<%lookforacommandsentfromtheFORMsectionbuttons
IfLen(Request.Form("cmdAdd"))Then使用是不是长度为0来判别
strVarName=Request.Form("txtVarName")
strVarValue=Request.Form("txtVarValue")
Application.Lock
Application(strVarName)=strVarValue此处报错
Application.Unlock
EndIf
IfLen(Request.Form("cmdRemoveThis"))Then
strToRemove=Request.Form("lstRemove")
Application.Lock
Application.Contents.Remove(strToRemove)
Application.Unlock
EndIf
IfLen(Request.Form("cmdRemoveAll"))Then
Application.Lock
Application.Contents.RemoveAll
Application.Unlock
EndIf
%>
<P><DIVCLASS="subhead">TheApplication.ContentsCollection</DIV>
<%
ForEachobjIteminApplication.Contents
IfIsObject(Application.Contents(objItem))Then
Response.Write"Objectreference:"&objItem&"<BR>"
ElseIfIsArray(Application.Contents(objItem))Then
Response.Write"Array:"&objItem&"contentsare:<BR>"
varArray=Application.Contents(objItem)
note:thefollowingonlyworkswithaone-dimensionalarray
ForintLoop=0ToUBound(varArray)
Response.Write"Index("&intLoop&")="&varArray(intLoop)&"<BR>"
Next
Else
Response.Write"Variable:"&objItem&"="_
&Application.Contents(objItem)&"<BR>"
EndIf
Next
%>
<P><DIVCLASS="subhead">TheApplication.StaticObjectsCollection</DIV>
<%
ForEachobjIteminApplication.StaticObjects
IfIsObject(Application.StaticObjects(objItem))Then
Response.Write"<OBJECT>element:ID="&objItem&"<BR>"
Endif
Next
%>
<!--collectvaluestoexecuteApplicationmethodswith-->
<FORMACTION="<%=Request.ServerVariables("SCRIPT_NAME")%>"METHOD="POST">使用Request.ServerVariables("SCRIPT_NAME")将表单提交给本身
<P><DIVCLASS="subhead">AddavaluetotheApplicationObject</DIV>
<INPUTTYPE="SUBMIT"NAME="cmdAdd"VALUE="">
Application("
<INPUTTYPE="TEXT"NAME="txtVarName"SIZE="15"VALUE="My_New_Value">
")="
<INPUTTYPE="TEXT"NAME="txtVarValue"SIZE="20"VALUE="Testing,testing...">
"<P>
</p>强大的可扩展性。ASP具有强大的扩展性,可以实现与多种网络、硬件设备的连接:通过专用的通讯线路远程接入企业;通过远程拨号服务器为远程拨号客户提供服务;通过WAP为移动电话互联网客户服务。 |
|