title: VB.NET: Load database columns into listview
body: <p>I'm trying to load an access database table into a listview's columns. I 've managed to load the first 4 columns of the database but there is a problem with the 5th one.</p>
  
  <pre><code>Public Sub DisplayPasswords()
      Passes.Items.Clear()
      Dim dt As New DataTable
      Dim ds As New DataSet
      ds.Tables.Add(dt)
  
      Dim da As New OleDbDataAdapter("Select * from passwords", con)
      da.Fill(dt)
  
      Dim myRow As DataRow
  
      For Each myRow In dt.Rows
          Passes.Items.Add(myRow.Item(1))
          Passes.Items(Passes.Items.Count - 1).SubItems.Add(myRow.Item(2))
          Passes.Items(Passes.Items.Count - 1).SubItems.Add(myRow.Item(3))
          Passes.Items(Passes.Items.Count - 1).SubItems.Add(myRow.Item(4))
          Passes.Items(Passes.Items.Count - 1).SubItems.Add(myRow.Item(5))
      Next
  End Sub
  </code></pre>
  
  <p>The error:</p>
  
  <pre><code>Overload resolution failed because no Public 'Add' can be called with these arguments:
  
  'Public Function Add(item As System.Windows.Forms.ListViewItem.ListViewSubItem) As System.Windows.Forms.ListViewItem.ListViewSubItem':
  </code></pre>
  
  <p>This is an image of the error I get: <a href="http://i.imgur.com/lG627fc.png" rel="nofollow">http://i.imgur.com/lG627fc.png</a></p>
  
  <p>This is an image of my access database: <a href="http://i.imgur.com/U0ZKrlR.png" rel="nofollow">http://i.imgur.com/U0ZKrlR.png</a></p>
  
  <p>This is an image of my listview: <a href="http://i.imgur.com/RjpDVTy.png" rel="nofollow">http://i.imgur.com/RjpDVTy.png</a></p>