hi all.
I want to fill the Listview from a mssql database in vb.net but it not show all the data in Listview. I have the followning code.
Dim sSQL As String Dim lvwItem As New ListViewItem()
sSQL = "SELECT field1, field2, field3 FROM tablenam e "
sSQL = sSQL & "ORDER BY field1 " Dim command As New SqlCommand (sSQL, myConne ction)
Dim reader As SqlDataR eader = command .Execute Reader()
While reader.Read()
lvwItem = ListView 1. Items. Add (reader.G etString (0))
lvwItem. SubItem s .Add (reader.G etString (1))
lvwItem. SubItem s .Add (reader.G etString (2))
End While
End Sub
it only show the first column data of database in Row . . . And not show any else. . Plz help me what problem in my code.