hye guys..here is the problem..how to use the item in the listview in order to retrieve data from database?
i have code that display 4 digit in every line in listview item..
Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click
Dim xmtBuf() As Byte = {&HAA, &H0, &H4, &H10, &H6, &H0, &H0, &H12, &HBB}
comport.Write(xmtBuf, 0, xmtBuf.Length)
Thread.Sleep(250)
'Comport.ReadByte()
UPdateTextBox()
End Sub
Public Sub UPdateTextBox()
If comport.IsOpen Then
Dim bytes As Integer = comport.BytesToRead
Dim buffer(bytes) As Byte
Dim tagid As String
'Dim i As Integer
'\\ to read data from read buffer
comport.Read(buffer, 0, bytes)
If buffer.Length > 1 Then
tagid = ByteArrayToHexString(buffer)
'If txtSearch.TextLength = 16 Then
txtSearch.Text = tagid
Dim tags As String = tagid.ToString
tags = tags.Substring(0, 4)
Dim test As String = "qweqwe1212adfaf2433adfa1133"
Dim allrfids As System.Text.RegularExpressions.MatchCollection = System.Text.RegularExpressions.Regex.Matches(tagid, "\d{4}(01)*")
For Each rfid As System.Text.RegularExpressions.Match In allrfids
tags = rfid.ToString
tags = tags.Substring(0, 4)
'TextBox3.Text = tags
'MsgBox("TAG: " & tags)
ListView1.Items.Add(tags)
next
some of the item in the listview have the same value with item in database..what i want is for every match item, the data from database will display automatically.