title: VB.NET listview not showing all data from dataset
body: <p>This issue is driving me mad, I can't work out why it's happening. I'm running a query in an access db using vb.net then putting the data into a listview. Code:</p>
  
  <pre><code>    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  
      Dim strAccessConn As String = "Provider = Microsoft.ACE.OLEDB.12.0; Data Source = T:\mydb.accdb"
      Dim cn As OleDbConnection = New OleDbConnection(strAccessConn)
      Dim ds As New DataSet
      Dim dt As DataTable
  
      'Note the query is entered as a string.
      Dim da As New OleDbDataAdapter("Q_LIST", cn) 'is the name of the query in Access 
  
      'Set the CommandType of the SelectCommand to TableDirect
      da.SelectCommand.CommandType = CommandType.TableDirect
      da.Fill(ds, "mytable")
      dt = ds.Tables("mytable")
  
      ListViewBatchResults.MultiSelect = True
      ListViewBatchResults.View = View.Details
      ListViewBatchResults.GridLines = True
      ListViewBatchResults.Columns.Clear()
      ListViewBatchResults.Items.Clear()
  
      For Each col As DataColumn In dt.Columns()
          ListViewBatchResults.Columns.Add(col.ToString)
      Next
  
      MsgBox(dt.Rows.Count)
  
      For Each row As DataRow In dt.Rows()
  
          Dim lst As ListViewItem
  
          lst = ListViewBatchResults.Items.Add(row(0))
  
          For i As Integer = 1 To dt.Columns.Count - 1
              lst.SubItems.Add(row(i))
          Next
  
      Next
  
  
  End Sub
  </code></pre>
  
  <p>This listview is not showing all the returned data though, and I can't work out why - it works on other queries in the DB but not this one for some reason. The row count shows that there are 264 rows, the listview only shows 3 of them when I run the project however. What the heck is going on?</p>
  
  <p>Cheers!</p>