Imports MySql.Data.MySqlClient

Public Class Form1
    Public sConnection As New MySqlConnection
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If sConnection.State = ConnectionState.Closed Then
            sConnection.ConnectionString = "SERVER = localhost; USERID = root; PASSWORD =; DATABASE = vb;"
        End If


    End Sub

    Public Sub LoadPeople()
        Dim sqlQuery As String = "SELECT * FROM tbl_people"
        Dim sqlAdapter As New MySqlDataAdapter
        Dim sqlCommand As New MySqlCommand
        Dim TABLE As New DataTable
        Dim i As Integer

        With sqlCommand
            .CommandText = sqlQuery
            .Connection = sConnection
        End With

        With sqlAdapter
            .SelectCommand = sqlCommand
        End With

        For i = 0 To TABLE.Rows.Count - 1
            With lvPeople
                With .Items(.Items.Count - 1).SubItems
                End With
            End With
    End Sub
End Class

please put break point in Loadpeople method and see are you getting the connectionto DB? and are you getting any records in TABLE

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.