Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select path to data when installing app
Message
From
31/12/2004 07:50:28
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
31/12/2004 07:05:24
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00973508
Message ID:
00973513
Views:
14
>Hi,
>This is probably easy to most of you but is my first trial.
>I have an app that utilitize free tables stored in the server
>under a directroy "app_data"
>
>To access the data I have this set path command hard coded
>in my main.prg: SET PATH TO "F:\APP_DATA"
>
>This is working fine except now I would like my program to be
>installable on any workstation on which the server is mapped to
>some other drive letters instead of F:. What changes do my program
>need in order to allow the user to set up the correct data data path
>while running setup of the app? How exactly is it done?
>
>Thanks for all help.
>
>--
>jw

You can ask the user the path (if not known yet) and put it in a file (any file would do, ini, txt, dbf, registry...). ie: Assuming keeping path in 'datapath.txt':
if !file('datapath.txt')
 lcPathDir = Getdir()
 * check for correctness of path etc here
 StrToFile(m.lcPathDir)
endif
set path to (FileToStr('datapath.txt'))
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform