Click here to Skip to main content
15,793,535 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i wish to use datareader to display records in a listview using vb.net and sqlserver
. can anyone post links or sample code to help me? thanks.
Posted

Google[^] is your friend.
 
Share this answer
 
Hi i am used datareader only for fetch the data,
when bind the list view that time used data table,


This is the code i am used,
VB
Dim dr1 as SqlDataReader
Dim dt As New DataTable
dr1 = cls.fill("SELECT * FROM [Employees]")
        dt.Load(dr1)
        ListView2.DataSource = dt
        ListView2.DataBind()

.

I hope this will help you..........
 
Share this answer
 

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