Wrox Programmer Forums
|
VB Databases Basics Beginning-level VB coding questions specific to using VB with databases. Issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Databases Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 6th, 2006, 04:04 AM
Registered User
 
Join Date: Feb 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Populate Listview

Hi! Need some help here guys...
How can i populate my listview with thosand of records from the database without using loops? or is it possible not to use loops in populating listview?

My problem with using loops is, it will take a while to load all the records in the listview because it will read from first to last record. Is their a way of speeding this up?

Hope you can help me here guys.
Thanks in advance.

 
Old February 6th, 2006, 08:38 AM
Friend of Wrox
 
Join Date: Dec 2005
Posts: 132
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to nalla Send a message via Yahoo to nalla
Default


Hi,

You can use List View's List Item's Add methos to add items to the ListView. Yes you can add items by using a loop.

Do while rsPrimary.EOF=False
  ListView1.ListItems.Add , , rsPrimary!Code
  rsPrimary.MoveNext
Loop

Consider other parameters of method also.


nalaka hewage





Similar Threads
Thread Thread Starter Forum Replies Last Post
ListView asters VB.NET 2002/2003 Basics 0 March 27th, 2008 05:00 AM
Populate ListView From ComboBox Select eusanpe C# 4 August 20th, 2007 06:49 PM
listView AristotleYu ASP.NET 2.0 Basics 0 May 11th, 2006 04:54 AM
ListView Control JelfMaria VB How-To 4 May 5th, 2005 12:39 AM
Listview Sorting adroc Pro VB 6 0 June 11th, 2003 01:26 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.