马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
ASP是依赖组件的,能访问数据库的组件好多就有好多种,再有就是你微软的工具可是什么都要收钱的啊!函数|函数文章来历:视点计划8see.net
http://blog.8see.net/
rem---表单提醒函数Being-----------------------------
CODECopy...
FunctionCheck_submit(str,restr)
ifstr=""then
response.write"<script>"
response.write"alert("&restr&");"
response.write"history.go(-1)"
response.write"</script>"
response.end
else
Check_submit=str
endif
EndFunction
CODECopy...
FunctionAlert_submit(str)
response.write"<script>"
response.write"alert("&str&");"
response.write"location.reload();"
response.write"</script>"
EndFunction
CODECopy...
Functionlocalhost_submit(str,urls)
response.write"<script>"
ifstr""then
response.write"alert("&str&");"
endif
response.write"location="&urls&";"
response.write"</script>"
EndFunction
rem---天生自界说位随机数Being-----------------------------
CODECopy...
Functionmakerndid(byValmaxLen)
DimstrNewPass
DimwhatsNext,upper,lower,intCounter
RANdomize
ForintCounter=1TomaxLen
whatsNext=int(2*Rnd)
IfwhatsNext=0Then
upper=80
lower=70
Else
upper=48
lower=39
EndIf
strNewPass=strNewPass&Chr(Int((upper-lower+1)*Rnd+upper))
Next
makerndid=strNewPass
EndFunction
rem---天生四位随机数Being-----------------------------
CODECopy...
Functionget_rand()
dimnum1
dimrndnum
Randomize
DoWhileLen(rndnum)<4
num1=CStr(Chr((57-48)*rnd+48))
rndnum=rndnum&num1
loop
get_rand=rndnum
EndFunction
rem---判别数据是不是整型Being-----------------------------
CODECopy...
FunctionIsInteger(para)
onerrorresumenext
dimstr
diml,i
ifisNUll(para)then
isInteger=false
exitfunction
endif
str=cstr(para)
iftrim(str)=""then
isInteger=false
exitfunction
endif
l=len(str)
fori=1tol
ifmid(str,i,1)>"9"ormid(str,i,1)<"0"then
isInteger=false
exitfunction
endif
next
isInteger=true
iferr.number0thenerr.clear
EndFunction
rem---数据库链接函数Being-----------------------------
CODECopy...
FunctionOpenCONN
Setconn=Server.CreateObject("ADODB.Connection")
connstr="Provider=Microsoft.Jet.OLEDB.4.0;DataSource="&Server.MapPath(DB_login)
conn.Openconnstr
EndFunction
rem---中笔墨符转Uncode代码函数Being-----------------------------
CODECopy...
FunctionURLEncoding(vstrIn)
strReturn=""
Fori=1ToLen(vstrIn)
ThisChr=Mid(vStrIn,i,1)
IfAbs(Asc(ThisChr))<&HFFThen
strReturn=strReturn&ThisChr
Else
innerCode=Asc(ThisChr)
IfinnerCode<0Then
innerCode=innerCode+&H10000
EndIf
Hight8=(innerCodeAnd&HFF00)&HFF
Low8=innerCodeAnd&HFF
strReturn=strReturn&"%"&Hex(Hight8)&"%"&Hex(Low8)
EndIf
Next
URLEncoding=strReturn
EndFunction
rem---Html过滤函数Being-----------------------------FunctionHtmlout(str)
CODECopy...
dimresult
diml
ifisNULL(str)then
Htmlout=""
exitfunction
endif
l=len(str)
result=""
dimi
fori=1tol
selectcasemid(str,i,1)
case"<"
result=result+"<"
case">"
result=result+">"
casechr(13)
ifsession("admin_system")=""then
result=result+"<br>"
endif
casechr(34)
result=result+"""
case"&"
result=result+"&"
casechr(32)
result=result+""
ifi+1<=landi-1>0then
ifmid(str,i+1,1)=chr(32)ormid(str,i+1,1)=chr(9)ormid(str,i-1,1)=chr(32)orm</p>SQLServer是基于服务器端的中型的数据库,可以适合大容量数据的应用,在功能上管理上也要比Access要强得多。在处理海量数据的效率,后台开发的灵活性,可扩展性等方面强大。 |