Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Paul Gibson
  Where is Paul Gibson?
 Glasgow
 United Kingdom
 Paul Gibson
 To: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 Tags
Subject: RE: TABLE LOCKED
Thread ID: 373287 Message ID: 373468 # Views: 27 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Databases, Tables and SQL Server
Date: Friday, March 22, 2013 10:35:58 AM         
   


> >
> > The advantage of embedding it in your EXE as you have already mentioned is that you limit the access to the user. The config.fpw should already have the basic settings for your application. It would be an unnecessary task to edit each config.fpw in each workstation where you install your program, right? So you embed it or attach it. That's it. So that when you copy the executable, you don't have to copy also the config.fpw.
> >
> > There are other advantages of using config.fpw. I don't think you are not using it till now? If you like to execute _SCREEN.Visible in your program instead of SCREEN=OFF in the config.fpw, then maybe it's your choice. But I would say, it is better if you put SCREEN=OFF in your config.fpw than _SCREEN.Visible = .F. in your main prg.
>
>
> I do use config.fpw but not in the way that I need to embed it inside the exe. I am not arguing whether it can be embedded or not because you can embed anything inside the exe. I am wondering about the benefit of doing such.
>
> If you say that that is to "prevent" others from touching your settings, then you should do those instead in the topmost prg and not on a config.fpw file. Because prgs get embedded inside the exe when you compile.
>
> IMHO, using config.fpw and later embedding it anyway inside the exe so no one can "change" its contents really sorts of beats out the purpose of having that outside text file.
>
> So we go back to my original question here. Why use config.fpw when the purpose is to make settings there fix anyway by embedding it later in exe? Why not simply SET those inside the topmost prg so those will be fixed; then for the rest of settings that you want to be flexible, be placed inside config.fpw which is outside of our app for further flexibility?
>
> Above you say "the advantage of embedding" but IMHO it is not really advantageous to do that. It is like what Tushar told me before on other matters which is like putting a "shackle" to something that's supposed to be free.
>

As Tom says it is your choice:

External Config.fpw = Immediate execution + flexibility
Internal to "main" PRG = Protected, "fairly soon" execution - some things not possible though (as Stefan pointed out)
Embedded Config.fpw = Immediate execution + protected
Embedded Config.fpw and allow externals = Immediate execution + protected + flexibility

There isn't one way that suits every scenario, choose the best for you. The last option gives you all the benefits but allows you to override anything on the fly. If that is concerning then just go to the embedding route without allowing externals. If you still don't see the benefit of embedding then choose one of the other routes.

Rick Schummer wrote a good post about Config.FPW a few years back:
http://rickschummer.com/blog/2008/06/vfp-include-configfpw-in-exe.html

ENTIRE THREAD

TABLE LOCKED Posted by Pratik Singh @ 3/20/2013 7:25:10 PM
RE: TABLE LOCKED Posted by Stefan Wuebbe @ 3/20/2013 7:32:19 PM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/21/2013 12:58:29 AM
RE: TABLE LOCKED Posted by Pratik Singh @ 3/21/2013 6:15:48 AM
RE: TABLE LOCKED Posted by Tore Bleken @ 3/21/2013 6:46:38 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/21/2013 6:55:58 AM
RE: TABLE LOCKED Posted by Tore Bleken @ 3/21/2013 7:24:04 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/21/2013 8:49:45 AM
RE: TABLE LOCKED Posted by Tore Bleken @ 3/21/2013 9:04:54 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/21/2013 9:11:30 AM
RE: TABLE LOCKED Posted by Tore Bleken @ 3/21/2013 9:22:49 AM
RE: TABLE LOCKED Posted by mk sharma @ 3/21/2013 10:32:49 AM
RE: TABLE LOCKED Posted by Tore Bleken @ 3/21/2013 10:39:59 AM
RE: TABLE LOCKED Posted by mk sharma @ 3/21/2013 3:56:51 PM
RE: TABLE LOCKED Posted by Stefan Wuebbe @ 3/22/2013 12:30:32 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/22/2013 1:27:33 AM
RE: TABLE LOCKED Posted by Stefan Wuebbe @ 3/22/2013 5:53:18 AM
RE: TABLE LOCKED Posted by Tom Saddul @ 3/22/2013 5:51:54 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/22/2013 6:15:08 AM
RE: TABLE LOCKED Posted by Stefan Wuebbe @ 3/22/2013 6:48:48 AM
RE: TABLE LOCKED Posted by Tom Saddul @ 3/22/2013 9:03:11 AM
RE: TABLE LOCKED Posted by Stefan Wuebbe @ 3/22/2013 9:19:13 AM
RE: TABLE LOCKED Posted by Tom Saddul @ 3/22/2013 10:59:37 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/21/2013 6:57:13 AM
RE: TABLE LOCKED Posted by Tore Bleken @ 3/21/2013 7:22:35 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/21/2013 8:41:40 AM
RE: TABLE LOCKED Posted by Tore Bleken @ 3/21/2013 9:06:22 AM
RE: TABLE LOCKED Posted by Tore Bleken @ 3/21/2013 9:08:09 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/21/2013 9:01:32 AM
RE: TABLE LOCKED Posted by Tom Saddul @ 3/21/2013 12:21:28 PM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/22/2013 12:07:32 AM
RE: TABLE LOCKED Posted by Tom Saddul @ 3/22/2013 3:21:31 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/22/2013 3:29:01 AM
RE: TABLE LOCKED Posted by Tom Saddul @ 3/22/2013 5:33:08 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/22/2013 6:28:07 AM
RE: TABLE LOCKED Posted by Tom Saddul @ 3/22/2013 9:05:35 AM
RE: TABLE LOCKED Posted by Paul Gibson @ 3/22/2013 10:35:58 AM
RE: TABLE LOCKED Posted by Stefan Wuebbe @ 3/22/2013 7:14:18 AM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/22/2013 7:40:37 AM
RE: TABLE LOCKED Posted by Stefan Wuebbe @ 3/22/2013 8:51:44 AM
RE: TABLE LOCKED Posted by Paul Gibson @ 3/21/2013 5:52:57 PM
RE: TABLE LOCKED Posted by Jun Tangunan @ 3/22/2013 12:08:17 AM