hi :D
please help me with this problem. i'm a newbie in vb.net
i have 6 columns in my listview that should show the data from the database.. but when i coded it like this :
Public Sub showmyrecords()
Dim dt As New DataTable
Dim ds As New DataSet
ds.Tables.Add(dt)
Dim da As New OleDbDataAdapter("Select * from Schedulings where YearLevels = '" & ComboBox3.Text & "', Sections = '" & ComboBox1.Text & "' ", asconn)
da.Fill(dt)
Dim myrow As DataRow
For Each myrow In dt.Rows
ListView1.Items.Add(myrow.Item(5))
ListView1.Items.Add(myrow.Item(6))
ListView1.Items.Add(myrow.Item(7))
ListView1.Items.Add(myrow.Item(8))
ListView1.Items.Add(myrow.Item(9))
ListView1.Items.Add(myrow.Item(10))
Next
End Sub
it shows the first row data(database) in the first column of my listview... how should i solve this problem?