只能把生成的记录放到数据库里面了


<!--#include file=conn.asp -->
<%
Function getCode(iCount)
  Dim arrChar
  Dim j,k,strCode
  arrChar = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  k=Len(arrChar)
  Randomize
  For i=1 to iCount
    j=Int(k * Rnd )+1
    strCode = strCode & Mid(arrChar,j,1)
  Next
  getCode = strCode
End Function
for kk=1 to 10
  ssjm=getCode(7)
  set rs=server.CreateObject("adodb.recordset")
  exec="select top 1 * from websjm where sjm='"&ssjm&"'"
  rs.open exec,conn,1,3
  
  if rs.eof then
    rs.addnew
    rs("sjm")=ssjm
    rs.update
  end if
  response.write ssjm&"<br />"
  response.flush()
next

%>


作者:Else 's Blog
地址:http://www.aixq.com/post/684/
版权所有。转载时必须链接形式注明作者和原始出处及本声明!
Tags:
代码 程序 编程 | 评论(0) | 引用(0) | 阅读(2346)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]
               

验证码 不区分大小写