Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
.ini files
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00150938
Message ID:
00150960
Vues:
22
Michelle,

There are several alternatives. I like using a one record table or a table with one record and two fields, one describes the setting the other contains the value. You could also use ini files. They are just text files. You can use VFP's low-level file functions (FOPEN(), FCREATE(), FPUTS(), FWRITE(), etc.). I think there are also some Win API functions for manipulating ini files. Another option is the registry. I think there is at least one class in the files section here that makes writing to and reading from the registry fairly easy. The registry is really only good for holding settings for a single user. It's not appropriate for information that needs to be shared. There can also be issues with losing data if someone gets a new computer or is using someone else's machine and has the registry stored locally.

Keep in mind that a user can easily open an ini file with Notepad and change the settings. This can be good or bad depending on your application.

>I've got some information that I'd like to store for my app, and I'm trying to decide how best to do it.
>
>I was thinking of making a table, but the table would only be one record with a lot of fields. That seems kind of silly.
>
>A lot of apps use .ini files to store configuration information. Is there anything special about them, or are they just text files? How would you know where in the file to change something? I don't know anything about manipulating text files with VFP.
>
>Or is there another option?
>
>Thanks,
>
>-Michelle
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform