Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
User changing data directory
Message
De
11/12/2000 15:14:50
 
 
À
11/12/2000 14:46:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Installation et configuration
Divers
Thread ID:
00451750
Message ID:
00451802
Vues:
26
>Trey that's exactly what I want to do. If they install the app and move the data to a different drive or directory, I want them to be prompted once and then not be prompted unless they change it again. Unfortunately I don't have much experience with .ini files. What should be included in it and when and how do I call it? Thanks for your help

INI files are simply text files with an INI extension. The extension doesn't really mean anything.
So, how you store items in there is up to you.
You could simply have:
D:\SOMEDIR\DATA\DATABASE.DBC
12
BOB
Where the 1st item is always the DBC, the 2nd is some number and the 3rd is the last user_id. Typically, though, there is a structure that is followed. Check out any INI file on your system and you'll probably see something like this
[GroupName]
Attribute1=somevalue
Attribute2=someothervalue
..etc..
In the HOME()+"ffc" directory, in the registry.vcx there's a class called OldINIReg. That should give you all you need to be able to read/write from an INI file in the standard manner. e.g.
oINI = NewObject("OldINIReg",Home()+"ffc\registry")
oINI.WriteINIEntry("c:\directory\database.dbc","Data Locations","Database",FullPath("my.ini"))
Creates an INI file called "my.ini" in the current directory with the following contents
[Data Locations]
Database=c:\directory\database.dbc
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform