Imports System.Data.SqlClient
Public Class frmAuditTrail

    Private Sub frmAuditTrail_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        listView1.Items.Clear()
        Try
            cm = New SqlCommand("select * from vwAuditTrail", cn)
            dr = cm.ExecuteReader
            While dr.Read
                lst = listView1.Items.Add(dr.Item(0).ToString)
                lst.SubItems.Add(dr.Item(1).ToString)
                lst.SubItems.Add(dr.Item(2).ToString)
                lst.SubItems.Add(dr.Item(3).ToString)
            End While
            dr.Close()
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    End Sub
End Class