Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I don't know how to add data in list View while i have five columns in my Data Base. Please suggest me the code for the desire task.
Thanks

What I have tried:

VB.NET
    Private Sub BtnFetchRds_Click(sender As Object, e As EventArgs) Handles BtnFetchRds.Click

        Rs = New ADODB.Recordset
        Rs.Open("select * from Employee")
        If Not Rs.EOF Then
            LstView.Items.Add(Rs)
        Else
            MsgBox("No Record Found in Data Base", MsgBoxStyle.Critical, strprojectname)
        End If
        Rs.Close()
    End Sub

End Class
Posted
Updated 29-Dec-16 2:16am
v2

1 solution

I would start reading the documentation.
 
Share this answer
 
Comments
Saadbinata 29-Dec-16 8:15am    
Sir, I told you in start i am new to vb.net
so i need to ask how to apply the list view for fetching the data from data base. This is my task and i need to know how we fetch the data.
i am trying like
Private Sub BtnFetchRds_Click(sender As Object, e As EventArgs) Handles BtnFetchRds.Click

Rs = New ADODB.Recordset
Rs.Open("select * from Employee")
If Not Rs.EOF Then
LstView.Items.Add(Rs)
Else
MsgBox("No Record Found in Data Base", MsgBoxStyle.Critical, strprojectname)
End If
Rs.Close()
End Sub

End Class

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900