测试代码语法高亮插件

<% 
  'dim Conn
  Const AccessFile="list.mdb"
  set Conn=Server.CreateObject("ADODB.Connection")
  Conn.ConnectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(AccessFile)
  'On Error Resume Next
  Conn.Open
  'If Err Then
  '   err.Clear
  '   Set Conn = Nothing
  '   Response.Write "数据库连接出错,请检查连接字串。"
  '   Response.End
  'End If
  set rs=Server.CreateObject("ADODB.Recordset")
  set rs.ActiveConnection=Conn
  rs.CursorType=3
  'rs.open"select * from List order by ID_bbs"

  'dim ID_bbs
  'dim str_md5
  'rs.movefirst
  'for i=1 to rs.recordcount
	' ID_bbs=rs.fields("ID_bbs").value
	' str_md5=md5(ID_bbs)
	' conn.execute("update List SET md5='"&str_md5&"' where ID_bbs='"&ID_bbs&"'")
    ' rs.movenext
  'next
  'rs.close
  
  rs.open"select * from List order By md5"
  rs.movefirst
  for i=1 to rs.recordcount
     if (i mod 4)=0 then
	     group_char="A"
	 elseif (i mod 4) =1 then
	     group_char="B"
	 elseif (i mod 4) =2 then
	     group_char="C"
	 elseif (i mod 4) =3 then
	     group_char="D"
	 End if
	 str_md5=rs.fields("md5").value
     conn.execute("update List SET ID_sortbyMD5="&i&",group_byMD5='"&group_char&"' where md5='"&str_md5&"'")
	 rs.movenext
  Next
  rs.close
  conn.close
  set rs=nothing
  set conn=nothing
  response.write("done!")
%>
2010年3月7日 | 归档于 默认
标签:
本文目前尚无任何评论.

发表评论

XHTML: 您可以使用这些标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>
:wink: :-| :-x :twisted: :) 8-O :( :roll: :-P :oops: :-o :mrgreen: :lol: :idea: :-D :evil: :cry: 8) :arrow: :-? :?: :!: