好的...经过很多天的尝试,我别无选择,只能寻求帮助。我用谷歌搜索了我的小心脏,现在它把我带到了这里。请帮忙。
我从我的 MySQL 数据库服务器得到一个字符串。然后我拆分字符串并将其放入一个数组中。
比我检查我的复选框并查看其中的任何条目是否等于数组值。问题是,它不起作用,对于我的生活,我无法让它起作用。
这有点像我拥有的模板,如果有人可以帮助我解决这个问题,我将不胜感激。
Using connection As New MySqlConnection("datasource = " + IPADDRESS + "; username = '" + USERNAME + "'; password='" + PASSWORD + "' ; database = '" + DBASE + "'")
Using Command As New MySqlCommand("SELECT * FROM hazinc WHERE title = '" + ListBox1.Text + "'", connection)
connection.Open()
'Command.ExecuteReader()
Using reader As MySqlDataReader = Command.ExecuteReader()
While reader.Read()
'TextBox2.Text = reader("title")
STRINGRR = reader("involved")
End While
Dim NEWSTRINGRR As String() = STRINGRR.Split(",")
Dim CC As Integer
CC = 0
For Each X In NEWSTRINGRR
For I = 0 To clbEmployees.Items.Count - 1
Try
If clbEmployees.Items(I).ToString() = NEWSTRINGRR(I).ToString() Then
SetItemChecked(I)
End If
Catch ex As Exception
' MsgBox(ex.ToString)
End Try
Next
Next
End Using
connection.Close()
End Using
End Using
任何人?请...?