將全形的字元轉變成半形字元,將半形轉變成全形 <% Function DSConvert(vString,vFlag) Rem vFlag為0時表示從全形轉為半形,為其他時表示從半形轉為全形 Dim i,tmpSingleCharaASC,TempResult,SAscString,DAscString SAscString = "1,2,3,4,5,6,7,8,14,15,16,17,18,19,20,21,22,23,24,25,26,27,33,34,3
經常使用到有關資料庫的操作。包括串連代碼、SQL命令等等,又不曾刻意去記憶它們(我本人是不願意去記這東東),所以常常在用到的時候又去查書本,翻來翻去。一些比較少用的資料庫還不一定能順利找到,所以現在把它們全歸納到這裡,提供大家參考。(個人水平有限,有缺陷之處,歡迎大家指正。) <一>。資料庫的串連方法: 1.Access資料庫的DSN-less串連方法: set adocon=Server.Createobject("adodb.connection")
'================================================== '函數名:UrlEncoding '作 用:轉換編碼 '================================================== Function UrlEncoding(DataStr) Dim StrReturn,Si,ThisChr,InnerCode,Hight8,Low8 StrReturn = "" For Si = 1 To
Secure Your Access Database How can you keep unwanted people from downloading your database simply by typing in the url? You can't, it is not possible. BUT you can secure it by adding a password to it. Below I will walk you through the steps
<!--#include file="inc/conn.asp"--> <% dim rs,sql,filename,fso,myfile,x Set fso = server.CreateObject("scripting.filesystemobject") filename = Server.MapPath("download.txt") if fso.FileExists(filename) then fso.DeleteFile(filename)
複製代碼 代碼如下:Function AutoLinkURLs(strString) Dim match, matches, offset, url, email, link, relnkAutoLinkURL relnkAutoLinkURL = "<a href=""[[%URL%]]"">[[%URLText%]]</a>" If Not IsObject(regExp) Then Set regExp = New RegExp
JS指令碼: <% dim rs dim sql dim count dim rs1 dim sql1 sql = "select * from region order by zoneid asc" set rs = server.createobject("adodb.recordset") rs.open sql,conn,1,3 %> <script language = "JavaScript"> var onecount; onecount=0;