Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using A Buffer File
Message
 
À
21/01/2002 21:13:19
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00590334
Message ID:
00630251
Vues:
25
Calvin,

This is an elegant solution that allows using buffering. The only problem I would envision is if there were many tables to be opened twice - either lots of memory consumed or lots of time opening the one needed an then closing it. Fortunately not a problem with the Clipper'87 application I am re-writing into VFP5.

I was thinking about doing the SEEK on the new transaction ID and then a SKIP to see if there were two of them to trigger the error, but I like the second file with a different alias much better.

thanks, dennis
PS: And thanks to Carmen for the thread. I too am migrating from 2.6 to VFP.

>Carmen,
>I have read this thread with great interest. If you want to use the fox2x approach I recomment that you follow this procedure:
>1. Create a property for your form , ie om (shorthand to me for object memvars)
>2. Instead of using scatter memvar blank or scatter memvar use scatter name om or scatter name om blank
>3. Now there is a reference for each variable in the table which can be reached with thisform.om.fieldname from anywhere in the form. Be sure to create a property for each table that is going to be refrenced in the form. The major advantage of this is that the variables are scoped inside of the property and you don't have the nasty problem which could sometime arise in fox2x with the fact that memory var were public and scoping bacame a problem with complex apps.
>
>If you want to use buffering and want to check for primary key validation then the general approach would be to do something like this
>1. use the table that you are going to search AGAIN and then do the search on that table - use thistable again in 0 order mykey. seek value. if found then get a new key else key is valid. Note: when you actually save the record you must do this proc again to ensure that someone has not gotten this key in the meantime.
>
>For most simple data entry the scatter name approach is good and cuts down on the complication as well as the fact that it seems so much more natural if you come out of heavy fox2x coding.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform