Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Paths & drive letter referencing over network applicatio
Message
From
14/04/1998 14:15:02
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00091853
Message ID:
00091859
Views:
23
>Hi there,
>I have a simple windows 95 peer to peer network of about 8 computers.
>
>In my last fpw2.6 application, all my files making up the application were dumped together in one directory/folder. Other computers on the network could access this application by simply mapping a drive letter (D: or E: or F: etc) to this folder, and then running the application.
>
>Now I have done things the 'correct' way and have my various files separated into subdirectories such as "data","menus","forms" etc.
>However, I have now had to use path referencing such as "do form c:\app\forms\form1.scx". This now causes problems for other computers on the network, because it looks for these files on their c: drives.
>
>I have tried changing the path to \\computername\app\forms\form1.scx but then I get an error: 'file already in use' on my computer.
>
>What I have done so far is to place the following in my 'startup' program:
>
>store sys(5) to mcDrive && store that computers mapped drive letter
> if sys(5) = "c:" && and it is my computer
> store "c:\app" to mcDrive && include this only for my computer
> endif
>
>Then I have changed paths to include the &mcDrive as follows:
>
>do form &mcDrive\forms\form1.scx
>
>Is this the best way of getting around this path problem? Any suggestions?
>
>Many Thanks

Normal way is to develop on normalized tree, i.e. you have project file in root folder and all included parts (forms,reports,etc.) of the project in subfolders (root/forms, root/reports, etc.). It will enable you to issue just DO FORM formname (i.e. forget about path at all). Database/Table files (excluded from project) will require another approach: you should programmatically reset DE.CursorX.Database(CursorSource) properties in each dataenvironment.beforeopentables event
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform