Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Best coding practices regarding open/unopen tables
Message
De
21/12/2003 10:24:06
Charlie Schreiner
Myers and Stauffer Consulting
Topeka, Kansas, États-Unis
 
 
À
17/12/2003 09:50:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00859873
Message ID:
00861095
Vues:
16
Hi Darrell,
I don't have any suggestion for the application you are currently working with. It was common practice to code that way years ago. I don't do that now.

Now I use only local views for editing purposes on vfp tables and all editings is in private datasessions. One can in those cases only all the tables at the beginning or not. If you open a table in a default DS, or in a private DS, I believe all subsequent USEs for the same table are essentially handled by VFP as a USE AGAIN.

Remember that views opens the tables and dbcs, but the update of records is an SQL UPDATE type command. So the table is USEd AGAIN, and that alias, whatever it is, is closed after the update. I believe this USE AGAIN does help in preventing corruption.


>An application I am working on opens tables at the beginning and does not close the tables until the end. The application does not use private data sessions. The assumption throughout is that these tables are always open. Of course, like many apps, as it expands things accidentally get close, crashes happen, etc. etc. and tables are not always open.
>
>Is it better in methods/programs to make sure the table is first open and if not open it or to generate an error and try to figure out why the table was closed in the first place and fix that problem?
Charlie
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform