Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Advantage of .txt files over a memo field?
Message
De
08/05/2007 07:46:19
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01223297
Message ID:
01223318
Vues:
18
I assume that the informations that you have to save isn't structured, because you would have used a normal table to do that. Do you need to search through that information? Do you need to print the information in a report? If you responded yes to at least one of these questions, a memo field would be best IMHO. Otherwise, a text file could do the job, but a text file have more disadvantages than you specified:

- Be sure to specify a UNC path (\\Server\Path\Filename), not a local path (C:\) if the files are located on a server and the path resolution occur on the workstation
- Corruption can occur if a file get renamed/deleted/moved manually
- Restoring from a backup is more error-prone because some files can be forgotten
- Corruption can occur if the path get written in the table, but the file couldn't get written on disk (power failure for example). Be sure to write the file first and, if it's successfull, write the path in the table
- You have to delete the file if the record get deleted (what about a RECALL?)

HTH

>Back to basics...
>
>I am designing a program to log a lot of certain information.
>
>A memo field would do the job, but I'm wondering if it would be better to store the information in a .txt file. The name of the .txt file can be kept in a table with the date and user name so that it is easy to find.
>
>The advantages of the .txt approach are:
>
> - The information is easy to find.
> - The problems with Fox table size limitations is avoided.
> - Memo bloat problems avoided.
>
>The disadvantages are:
>
> - The chosen directory gets filled with lots of files, most of which are less than 1kb in size (some are bigger).
>
>Any thoughts on which approach is better?
>
>Or other approaches?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform