Let's try to narrow this down. I'm guessing that you have a database that you want to be able to search. The user is presented with a listview containing predefined search strings. The user (possibly) selects an item in the listview. This causes the database to be searched for the selected string. The last part "then highlight the selected item in the listview" doesn't make sense to me because the selected item is automatically highlighted.
There are probably several other interpretations of your request so please provide more detail.
After beating my head into the wall 1,000 times over when working with listview, I have discovered an easy way.
Dim index as String
For Each sItem As ListViewItem In DatabaseListView.SelectedItems
index = sItem.Text
'this will select the item at the start of the row that is clicked.
'you can use that item to then reference your database.
If there is one thing I have learned in over 30 years of dealing with users and program specs it is this - if you don't know what your program is supposed to do then you had better not start writing it.
That's why I am trying to get the OP to more clearly define the problem. For example, the OP has not even specified what mode the listview is in. You might assume Detalis or List, but in the absence of specific information and a clear definition of the problem, supplying code is (at least in my opinion - not that I have anything better to do at the moment ;)) counterproductive.
One other gem I heard from the users more times than I liked was "that's just what I asked for but not what I wanted"
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...