I finished my application and loaded the data in the database and now when sending a request the data loads in to a listview.
But when it shows not all the rows are filled correct and you see empty rows in the list view.
It looks like uncoupling of the rows
But when it shows not all the rows are filled correct and you see empty rows in the list view.
It looks like uncoupling of the rows
VB.NET:
Private Sub Zoekinstellingen_laden(ByVal SQLString As String)
Dim lv_item = 0
Dim rs As New ADODB.Recordset
Try
LstKelderboek.Items.Clear()
rs.Open(SQLString, cn)
Do While Not rs.EOF = True
LstKelderboek.Items.Add(rs.Fields.Item("idtblWijn").Value)
LstKelderboek.Items(lv_item).SubItems.Add(rs.Fields.Item("wijnhuis").Value)
LstKelderboek.Items(lv_item).SubItems.Add(rs.Fields.Item("Jaar").Value)
LstKelderboek.Items(lv_item).SubItems.Add(rs.Fields.Item("TblLandnm").Value)
LstKelderboek.Items(lv_item).SubItems.Add(rs.Fields.Item("tblstreek").Value)
LstKelderboek.Items(lv_item).SubItems.Add(rs.Fields.Item("tblAppellationnm").Value)
LstKelderboek.Items(lv_item).SubItems.Add(rs.Fields.Item("Aantal").Value)
LstKelderboek.Items(lv_item).SubItems.Add(rs.Fields.Item("tblOpslagcol").Value)
rs.MoveNext()
lv_item = lv_item + 1
Loop
rs.Close()
Catch ex As Exception
MsgBox("Kelderboek Foutmelding: " & vbCrLf & vbCrLf & "De streken zijn niet ingeladen." & vbCrLf & vbCrLf & ex.Message)
Finally
rs = Nothing
End Try
End Sub