title: how to search a record in database through textbox and display it in a listview
body: <p>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)  <code>enter code here</code></p>
  
  <p>this is the query that i used for search</p>
  
  <pre><code>Dim SqlQuery As String = "SELECT * FROM sample WHERE FirstName like ' % " &amp; TextBox4.Text &amp; " % ' 
  </code></pre>
  
  <p>and this is the code i used to display it in listview"</p>
  
  <pre><code>    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
  </code></pre>