so i have this simple system that adds update's and delete records from the database.. i want to search data in database.. I've used some codes that i know but it doesn't work.. is there any other codes for searching a data in the database and display it in the list view//??. (sorry for the bad English) enter code here
this is the query that i used for search
Dim SqlQuery As String = "SELECT * FROM sample WHERE FirstName like ' % " & TextBox4.Text & " % '
and this is the code i used to display it in listview"
ListView1.Items.Clear()
For i = 0 To TABLE.Rows.Count - 1
Dim li As new ListViewItem
li=ListView1.Items.Add(TABLE.Rows(i)("ID").ToString())
li.SubItems.Add(TABLE.Rows(i)("FirstName").ToString())
li.SubItems.Add(TABLE.Rows(i)("MiddleName").ToString())
li.SubItems.Add(TABLE.Rows(i)("LastName").ToString())
li.SubItems.Add(TABLE.Rows(i)("Gender").ToString())
Next