i dont know what to do with this codes. when i used this to other forms it runs without error except for the one form. error says : "The ConnectionString property has not been initialized." but then i already initialized it. please help me.
Public Sub showmyrecords()
Dim lvi As ListViewItem
Dim dt As New DataTable
Dim ds As New DataSet
' Dim intCount As Integer
ds.Tables.Add(dt)
Dim da As New OleDbDataAdapter("Select * from Schedulings where YearLevels = '" & TextBox3.Text & "' and Sections = '" & TextBox4.Text & "'", asconn)
da.Fill(dt)
Dim acscmd As New OleDb.OleDbCommand
acscmd.CommandText = strsql
acscmd.Connection = asconn
ListView1.Items.Clear()
For Each myrow__1 As DataRow In dt.Rows
lvi = New ListViewItem()
lvi.Text = myrow__1(5)
lvi.SubItems.Add(myrow__1(6))
'6 is 7th column in datatable!!!
lvi.SubItems.Add(myrow__1(7))
'and so on...
lvi.SubItems.Add(myrow__1(8) + "-" + myrow__1(9))
lvi.SubItems.Add(myrow__1(10))
ListView1.Items.Add(lvi)
Next
End Sub