Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using A Buffer File
Message
De
21/01/2002 21:13:19
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
 
 
À
05/12/2001 23:14:18
Carmen Gassi
Perseus Software Systems
Oakville, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00590334
Message ID:
00608189
Vues:
25
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.
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform