Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Marking records
Message
De
19/06/2001 15:05:48
 
 
À
19/06/2001 14:48:11
Ing. T.R.M. Pluym
Pluym Elektronics Bv
Hulst, Pays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00521179
Message ID:
00521188
Vues:
20
>I am trying to setup a grid where I can mark some records for later action.
>For example mark witch labels to print out.
>
>The first method I use was to create an array and add the record numbers of the marked records (this is the way my DOS application use to work).
>This method has the following advantages:
>
>1. quick, marking and unmarking a bunch of records goes very quick.
>2. I can save an instance on an array to disk for later use.
>3. network capable, each user can mark his own records.
>4. i don't need a field for it
>
>disadvantages
>1. maximum size of on array
>2. when I pack or re-use a recordnumber, the saved-array does not match anymore.
>
>Other people advise me to use an additional field. Here also the advantages and disadvantages.
>
>advantages:
>
>1. easy to program
>
>disadvantages:
>
>1. not network ready (everybody has the same markings).
>2. slower than the array method
>3. not easy to save to disk, when a routine was written to save the marked recordnumbers to disk the same disadvance occurs (when I pack or re-use a recordnumber, the saved-array does not match anymore).
>
>Can somebody give me his or her idea to solve this issue ?
>
>Thanks in advance...


Hello,

I would first ask you, do your records have a primary key? Or at least some unique identifer, whether it be a LabelID field or maybe the label caption itself makes each records unique? As you have discovered, using the record number is not a good approach.

Have you tried using a cursor that gets created at runtime(similar to your array)? Again, you would need to have a unique identifier for each record, but you would no longer have the size limitation of an array and you could easily incorporate the option to save to a table on disk.


- Brian


VFP6 SP5, VFP8 SP1, VFP 9 SP 1 and Win XP SP 3 (unless otherwise specified)


www.wulfsden.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform