Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Record Pointer Best Practice
Message
De
27/07/2001 11:42:08
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00536306
Message ID:
00536465
Vues:
10
>First off, I wouldn't store the record number because for a view, that can be dynamic and may not work between each requery. Store the Key expression for the record. Instead of using GO, you will have to change it to a LOCATE (if not indexed) or SEEK (if indexed) but I hope that isn't too difficult.

No, I don't think that would be a big change. At least in the app I'm looking at now.

>Second, I would create a 2-dimensional form-level array property to hold the view information. You could create a form-level method to retrieve the key value by passing in the view name.

Such that it would look like the pseudo example below?
aViewRecord(1,1) = 'View1'
aViewRecord(1,2) = 'KeyField'
aViewRecord(2,1) = 'View2'
aViewRecord(2,2) = 'KeyField'
>Third and my recommended suggestion is to create a form level collection property. The basics of it are that VFP collection objects are wrappers to arrays. The functionality is already built into it to handle the stuff mentioned in the above paragraph. You can download a few examples from the Downloads section. There are also two articles in the May and June VFUG newsletters (sign-up is free to access newsletters).

So, I would reference the wrapper and it would return the view information? Or did I simplify that too much?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform