Re: SET DEFAULT or ?

2019-08-14 Thread Peter Cushing
I can run my app from any location as long as all the supporting files
are there.  Your default folder will be the folder you started the EXE
in unless you have a DEFAULT = line in your startup config.fpw
At startup I set a public variable
ps_home = FULLPATH('')

Any paths referenced in my app will use this var.

HTH

Peter Cushing
IT Department
WHISPERING SMITH


On 14/08/2019 04:57, Gene Wirchenko wrote:
> Hello:
>
>   I have an app that has for years been executed out of the 
> default directory with the data there, too.
>
>   Now, I have to give at least the data an arbitrary 
> location.  Can I use SET DEFAULT for this and save having to rewrite 
> hundreds of table referring statements?  Or are there nasty things to 
> worry about?
>
>   I am thinking of having a config table in the startup default 
> directory that specifies the data directory and then SET DEFAULT to 
> that directory.  When executing a .exe version of the app, I think 
> this will not cause trouble, but for a debug version with separate 
> .fxp, I think I also need to SET PATH for the code to be found.   I 
> join all my code together with SET PROCEDURE TO ... ADDITIVE  in the 
> startup .fxp if that makes a difference.  Are the gotchas going to get me?
>
> Sincerely,
>
> Gene Wirchenko
>
>
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/184326e5-2be5-4864-0e8e-82bf7902e...@whisperingsmith.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

AW: SET DEFAULT or ?

2019-08-14 Thread juergen
Normally a SET PATH TO would be sufficient.  If you're using a DBC, then
just explicitly open that DBC with the provided path is all you need.

wOOdy



-Ursprüngliche Nachricht-
Von: ProFox  Im Auftrag von Gene Wirchenko
Gesendet: Mittwoch, 14. August 2019 05:58
An: ProFox Email List 
Betreff: SET DEFAULT or ?

Hello:

  I have an app that has for years been executed out of the default
directory with the data there, too.

  Now, I have to give at least the data an arbitrary location.  Can I
use SET DEFAULT for this and save having to rewrite hundreds of table
referring statements?  Or are there nasty things to worry about?

  I am thinking of having a config table in the startup default
directory that specifies the data directory and then SET DEFAULT to that
directory.  When executing a .exe version of the app, I think this will not
cause trouble, but for a debug version with separate 
.fxp, I think I also need to SET PATH for the code to be found.   I 
join all my code together with SET PROCEDURE TO ... ADDITIVE  in the startup
.fxp if that makes a difference.  Are the gotchas going to get me?

Sincerely,

Gene Wirchenko


[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/046501d55279$601ea840$205bf8c0$@wondzinski.de
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: SET DEFAULT or ?

2019-08-14 Thread Alan Bourke
You need to know the location of the data, say lcLocation then:

If you're using a DBC it's just 
open database (addbs(lcLocation) + "mydbc")
use table1 in 0
use table2 in 0

If you're opening tables explicitly then then:

use (addbs(lcLocation) + "table1") in 0
use (addbs(lcLocation) + "table2") in 0

And so on.

Beyond that it doesn't matter where they are as long as the user has r\w access 
to the location. And it's not opening them directly over the internet or 
something silly.

-- 
  Alan Bourke
  alanpbourke (at) fastmail (dot) fm

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/ca3462bd-f9cf-4fff-a9b2-f846a293c...@www.fastmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.


Re: SET DEFAULT or ?

2019-08-14 Thread Jean Laeremans
Must have done this at least 30 years ago. ;)


Op wo 14 aug. 2019 13:27 schreef Alan Bourke :

> You need to know the location of the data, say lcLocation then:
>
> If you're using a DBC it's just
> open database (addbs(lcLocation) + "mydbc")
> use table1 in 0
> use table2 in 0
>
> If you're opening tables explicitly then then:
>
> use (addbs(lcLocation) + "table1") in 0
> use (addbs(lcLocation) + "table2") in 0
>
> And so on.
>
> Beyond that it doesn't matter where they are as long as the user has r\w
> access to the location. And it's not opening them directly over the
> internet or something silly.
>
> --
>   Alan Bourke
>   alanpbourke (at) fastmail (dot) fm
>
[excessive quoting removed by server]

___
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/capqlobxks7fn0h-b6orycpks7r8fvg+u5xqp60x1a-bnjps...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.