Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Switching from Registry to INI.- MM 7 for VFP
Message
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00874801
Message ID:
00875058
Views:
16
Juan,

>Good morning, I just wanted to switch from storing the system settings (DBC mainly) in the registry to an INI file (this is MM VFP 7).
>Changed application object’s lUseIniFile property and the program now creates the ini files.
>
>Now everytime that I either open the applicacion or the users preference form, the value for the DBC location changes to the curdir()+"data\" , since the data is not there, the application bombs.
>
>It seems like the preferenceform ....oLocalDataDirectory.cpreferencevalue property default value is taking over (=FULLPATH(CURDIR()) + 'DATA\').
>
>This should be easy, shouldn't it?

You need to make sure you have a [DBC Locations - Local] and [DBC Locations - Remote] setting in your ini file. For example:
[DBC Locations - Local]
projmgr=c:\projmgr\data\projmgr.dbc

[DBC Locations - Remote]
projmgr=c:\projmgr\data\projmgr.dbc
Alternately, if you want to use an ini file for all other settings, but want to store your database settings in the MetaDbc table, you can set your application's lUseDbcMgrMetaData property to true (and see the section in the MM VFP Dev Guide "Use the MetaData Database Manager" under the topic "Specifying Additional Database Containers".

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform