|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
SQLServer是基于服务器端的中型的数据库,可以适合大容量数据的应用,在功能上管理上也要比Access要强得多。在处理海量数据的效率,后台开发的灵活性,可扩展性等方面强大。session|变量|数组IfyoustoreanarrayinaSessionobject,youshouldnotattempttoaltertheelementsofthestoredarraydirectly.Forexample,thefollowingscriptwillnotwork:<br>
<br>
<%Session("StoredArray")(3)="newvalue"%><br>
<br>
ThisisbecausetheSessionobjectisimplementedasacollection.ThearrayelementStoredArray(3)doesnotreceivethenewvalue.Instead,thevalueisindexedintothecollection,overwritinganyinformationstoredatthatlocation.<br>
<br>
ItisstronglyrecommendedthatifyoustoreanarrayintheSessionobject,youretrieveacopyofthearraybeforeretrievingorchanginganyoftheelementsofthearray.Whenyouaredonewiththearray,youshouldstorethearrayintheSessionobjectagainsothatanychangesyoumadearesaved.Thisisdemonstratedinthefollowingexample:<br>
<br>
---file1.asp---<br>
<%<br>
Creatingandinitializingthearray<br>
DimMyArray()<br>
RedimMyArray(5)<br>
MyArray(0)="hello"<br>
MyArray(1)="someotherstring"<br>
<br>
StoringthearrayintheSessionobject.<br>
Session("StoredArray")=MyArray<br>
<br>
Response.Redirect("file2.asp")<br>
%><br>
<br>
---file2.asp---<br>
<%<br>
RetrievingthearrayfromtheSessionObject<br>
andmodifyingitssecondelement.<br>
LocalArray=Session("StoredArray")<br>
LocalArray(1)="there"<br>
<br>
Printingoutthestring"hellothere."<br>
Response.Write(LocalArray(0)&LocalArray(1))<br>
<br>
Re-storingthearrayintheSessionobject.<br>
ThisoverwritesthevaluesinStoredArraywiththenewvalues.<br>
Session("StoredArray")=LocalArray<br>
%><br>
<br>
</p>专业性的服务。有的ASP商提供垂直型的应用服务,针对某一特定行业提供应用服务。 |
|