複製代碼 代碼如下:using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using
asp.net壓縮檔夾調用樣本:rar("e:/www.jb51.net/", "e:/www.jb51.net.rar"); asp.net解壓縮rar檔案調用樣本:unrar("e:/www.jb51.net.rar", "e:/"); 複製代碼 代碼如下:using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; namespace BLL { public
一、新手常犯的錯誤 在論壇看到很多文章代碼中都有一個共同的基本錯誤,欄位類型錯誤。 程式和資料庫是緊緊相連的,資料庫欄位文本型或時間型的都使用單引號 比如下面這段修改語句: conn.execute "update Counts set counts='"&counts&"' where num="&num&" and Atime='"&now()&"'" 等號左邊都是欄位名,等號右邊是傳值過來的變數名,counts
[b]方法一、盡量使用複雜的SQL來代替簡單的一堆SQL[/b] 同樣的事務,一個複雜的SQL完成的效率高於一堆簡單SQL完成的效率,有多個查詢時,要善於使用JOIN。 oRs=oConn.Execute("Select * FROM Books") while not ors.Eof strSQL = "Select * FROM Authors Where AuthorID="&oRs("AuthorID") ors2=oConn.Execute(strSQL)
比如 1223445677777778aabbcccccccccc 經過過濾之後就是12345678abc 複製代碼 代碼如下:<% '過濾重複 Function norepeat(Str) Dim RegEx If IsNull(Str) Or Str="" Then Exit Function Set RegEx=New RegExp RegEx.Global = True RegEx.IgnoreCase=True
Rem 將字串轉換為整形資料 function toInteger(str,num) str=trim(str) if str="" or not isnumeric(str) then toInteger=num else toInteger=clng(str) end if end function Rem 將字串轉換為雙精確度型資料 function