Re: Array vs. Collection and search for value

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Douglas Marquardt (no_spam_at_dummy.com)
Date: 06/15/04


Date: Tue, 15 Jun 2004 11:44:22 -0600

Hi Robertico:

Have you considered using a recordset to store the values?
That way, you could simply apply a filter or use Find to
determine if a value exists; and sort it if need be.
If you need the values in an array, then you could use GetRows.
Of course you would have to test this for performance etc.,
but it may be another option to consider in case it works for you.

Doug.

"Robertico" <Robertico@Mymail.com> wrote in message news:rnGzc.169$%27.2512@zonnet-reader-1...
> Hi,
>
> I need some advice using an Array or a Collection.
>
> My App. reads a file with 40000 or more (hex) values (30 characters long)
> sometimes sorted and sometimes not sorted.
> After that i have to test for the appearance of an value in that list.
> Now i'am using an collection, but it's slow.
>
> What's the best to use for this, an Array or a Collection and what kind of
> search algorithm must i use.
>
> Robertico
>
>



Relevant Pages

  • Re: Saving color with ApplicationSettingsBase
    ... a single instance of my Filter Class does not store its color correctly... ... Array, it is not saved any more by the settings system. ... I tried to add a new color property along with my array, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ADP Main Form Disabled when Editing Subform
    ... then I store parameter values in that table. ... I simply requeried the data to reset the main form's recordset that would do ... that filter and there's really no way to know what they filtered for. ... Essentially I suppose, I'm looking for something that says, requery the ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Array vs. Collection and search for value
    ... Have you considered using a recordset to store the values? ... you could simply apply a filter or use Find to ... If you need the values in an array, ...
    (microsoft.public.vb.enterprise)
  • Re: Recordset.Save Method Does Not Persist Filtered Data
    ... Use a criteria string to filter the recordset before saving is not ... Filters created with an Array ...
    (microsoft.public.data.ado)
  • Re: Array development
    ... The more elegant way would be to filter the recordset to find the records ... Putting a recordset into an array is unnecessary given ...
    (microsoft.public.access.formscoding)