Function RoundStr(StrLng,StrNum)
dim TmpStr
TmpStr = "0123456789abcdefghijklmnopqrstopwxyz"
for iii=1 to Strnum
for jjj = 1 to StrLng
Randomize
strLen = Len(TmpStr)
t = Round((RND * (strLen-1))+1)
s = s & mid(TmpStr,t,1)
Next
s=s&"<br>"
Next
RoundStr = s
response.write RoundStr
If Request.Form("IsSubmit") = "True" Then
Response.Write Request.Form("Count")
Count = Cint(Request.Form("Count"))
Do While i < Count
Pass = False
Do While Not Pass
for jjj = 1 to 6
Randomize
strLen = Len(TmpStr)
t = Round((RND * (strLen-1))+1)
s = s & mid(TmpStr,t,1)
Next
RoundStr = s
strSQL = "select id from aaa.t_tttuser Where username = '" & RoundStr & "'"
Set objRS = objDB.Execute(strSQL)
If objRS.EOF Then
Pass = true
End If
Loop
strSQL = strSQL & " insert into aaa.t_tttuser (username) values('"&RoundStr&"')"
'strShow = strShow & "<tr><td>" & i+1 & "</td><td>" & RoundStr & "</td></tr>"
i = i + 1
objDB.Execute(strSQL)
Loop
Sub CalCaPiao()
Dim strCaiPiaoNoArr() As String
Dim strSQL As String
Dim strCaiPiaoNo As String
strCaiPiaoNo = "01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33"
Dim StrTempArr(7) As String
Dim strZhongJiangArr(7) As String
strCaiPiaoNoArr = Split(strCaiPiaoNo, ",")
Dim intRand As Integer
Dim i As Integer
Dim j As Integer
i = 0
Dim find As Boolean
Do While True
find = False
Randomize
intRand = Int((33 * Rnd) + 1)
For j = 0 To i - 1
If StrTempArr(j) = CStr(intRand) Then
find = True
End If
Next
If Not find Then
StrTempArr(j) = CStr(intRand)
strZhongJiangArr(i) = CStr(intRand)
'Text1(i) = strZhongJiangArr(i)
i = i + 1
If i = 7 Then
Exit Do
End If
End If
Loop
End Sub