Hi, can you help me please how can i populate data from my listview using sqldatareader.
by the way can you please explain me why is it that listview in first column we call item but the other column we call it subitems.can you please enligthen my mind on this.I am confuse in this listview.
this is what i have got but it will not display properly did i missed something???
Private Sub DisplayRecords(ByVal lvw As ListView)
mysqlcommand = New SqlCommand("select * from myTable", con)
Dim reader As SqlDataReader = mysqlcommand.ExecuteReader
While reader.Read()
lvw.Items.Add(reader.Item(0))
lvw.Items.Add(lvw.Items.Count - 1).SubItems.Add(reader.Item(1))
lvw.Items.Add(lvw.Items.Count - 1).SubItems.Add(reader.Item(2))
End While
End Sub