嗨,请检查此代码
For icnt As Integer = 1 To 100
Me.SetText(icnt)
Dim gd As String = ""
Dim gl As String = ""
Dim cr As String = ""
Dim lr As String = ""
Dim tbs As String = ""
Dim srt As String = ""
Dim fp As String = ""
Dim ky As String = ""
Dim prx As String = ""
Dim rnd As New Random
Dim scrpurl As String = ""
Dim bldstr As New List(Of String)
scrpurl = GlobalVariables.domain(rnd.Next(0, GlobalVariables.googledomain.Count - 1)) & "/search?q="
scrpurl = scrpurl & GlobalVariables.prints(rnd.Next(0, GlobalVariables.footprints.Count - 1))
scrpurl = scrpurl & GlobalVariables.words(rnd.Next(0, GlobalVariables.keywords.Count - 1))
scrpurl = scrpurl & GlobalVariables.gl(rnd.Next(0, GlobalVariables.googlegl.Count - 1))
scrpurl = scrpurl & GlobalVariables.cr(rnd.Next(0, GlobalVariables.googlecr.Count - 1))
scrpurl = scrpurl & GlobalVariables.lr(rnd.Next(0, GlobalVariables.googlelr.Count - 1))
scrpurl = scrpurl & GlobalVariables.tbs(rnd.Next(0, GlobalVariables.googletbs.Count - 1))
scrpurl = scrpurl & GlobalVariables.start(rnd.Next(0, GlobalVariables.googlestart.Count - 1))
MsgBox(scrpurl)
bldstr.Clear()
bldstr.Add(scrpurl)
Dim dr3 As DataRow() = dtse.Select("seurl ='" & scrpurl & "'", "se")
If (dr3.Count = 0) Then
Dim w1 As WaitCallback = New WaitCallback(AddressOf setdata)
ThreadPool.QueueUserWorkItem(w1, bldstr)
End If
Next
谁能告诉我,当我显示消息框时,我看到 scrpurl 和 setdata 的不同值添加了正确的 100 个唯一行。
当我不显示它时,setdata 会添加 100 行相同的 scrpurl。我知道应该做一些事情,以便每个 setdata 获得不同的 scrpurl,但我在这里遗漏了一些东西。谁能帮帮我?
问候,