checking occurence in a listview..

pasensyoso_manigbas

Well-known member
Joined
May 19, 2006
Messages
64
Programming Experience
Beginner
hello guys..

anyone there knows how to check the occurence of the values in a list view?

what really happen is when i populate the list view with records using a loop structure
it gives duplicate record of the first record before fetching another one.. what im trying to
do here is.. i want to eliminate the duplicates and retain only the original..

im stuck to this... i haven't get this right.... pls help..
 
if the records come from a database, you can have the database remove the duplicates by using grouping

if youre building the records elsewhere, such as files on disk or reading out of a text file, then you have the option of reading them into a hashtable. i wrote a program to de-dupe massive files, and using a hashtable (it was in c# but vb should be the same speed because they compile to more or less the same thing) it was able to process a file of 33000 records in a few seconds, and find only the ones that appeared in todays file, that didnt appear in yesterday's file..

if you want some help with hashtables, be sure to ask - theyre quite simple though, and if youre familiar with a Collection, then hashtable works in nearly identical ways. they might even be based on the same thing, i'm not sure..
 
I not quite familiar with Hashtables... could you site some examples?
 
you are familiar with nothing ... but you are not inerested to learn as well ... i noticed it from your questionS (oh yeah) you just want someone else to do your job (homework or whatever). I think it is final time to start to learn ... give me show you how i would do this. I would use google and see what the hastable is 1st ..then i would try to find some good articles about it and then back with the concrete question here ... while you want us to teach you from scratch ..it is what i hate most of all ways of learning.
C'mon :)
 
pasensyoso_manigbas said:
I not quite familiar with Hashtables... could you site some examples?

it's one of the most well known and used fast-lookup containers in the programming world since, like.. the 80s or soemthing. just typing vb.net hashtable into google should bring you all the results you'd need..

and after you read all about it, you will see that it works in much the same was as kulrom said for his example, and you will wish you followed his advice :)
 
Back
Top