Hello
Teachers
I create a project in vb.net 2010 with access database. I want to show data in listview. It Is show in listview but a problem I entry Id wise. So, when I click on the show data button I see the Id . How to show the id wise actual data.
I use the code for data load in listview1
Public Sub Displayitem()
ListView1.Items.Clear()
Dim cmd As New OleDb.OleDbCommand("SELECT * FROM pur_inv ORDER BY purinvdt", cn)
Dim dr As OleDb.OleDbDataReader = cmd.ExecuteReader()
Do While dr.Read()
Dim new_item As New _
ListViewItem(dr.Item("purinvdt").ToString)
new_item.SubItems.Add(dr.Item("purinvid").ToString)
new_item.SubItems.Add(dr.Item("prtid").ToString)
new_item.SubItems.Add(dr.Item("invtypid").ToString)
new_item.SubItems.Add(dr.Item("taxamt").ToString)
new_item.SubItems.Add(dr.Item("tottaxblamt").ToString)
new_item.SubItems.Add(dr.Item("invamt").ToString)
ListView1.Items.Add(new_item)
Loop
End Sub