Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
An approaxh to network drives and paths.
Message
From
16/04/1998 02:00:20
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
An approaxh to network drives and paths.
Miscellaneous
Thread ID:
00092406
Message ID:
00092406
Views:
51
After reading the responses to Mr. David Wheeldon's question (Paths & drive letter referencing over network application) and thinking about some of my current needs, I came up with the following design which is an elaboration of my current system table. This may be overkill (KISS needed?) but I thought I would throw it out for comments. All feedback welcome.

See also the relevent thread begun by Mr. Augusto Marin, "A better set path to..."

Peter Robinson



Structure for database: C:\FP\APP\SYSTAB.DBF
Number of data records: 1
Date of last update : 04/16/1998
Memo file block size : 48
Code Page : 0
Field Field Name Type Width Dec Index Collate
1 CSYS_DRIVE Character 2
2 CLOC_DRIVE Character 2
3 MDEFAULT Memo 10
4 MPROJ_PATH Memo 10
5 MSYS_PATH Memo 10
6 MLOC_PATH Memo 10
7 MFF_PATH Memo 10
8 MZIP_PATH Memo 10
9 MPROCEDURE Memo 10
10 CCOMPANY Character 40
11 CCOMP_ADD1 Character 40
12 CCOMP_ADD2 Character 40
13 CCOMP_CITY Character 20
14 CCOMP_ST Character 12
15 CCOMP_ZIP Character 10
16 NBLOCKSIZE Numeric 2
17 NMEMOWIDTH Numeric 2
18 MNOTES Memo 10
...
** Total ** ...

Also LOCTAB.DBF with identical structure.

(I'm making changes to a FP 2.6 app I wrote so the
structure above is for 2.6.)


From mNotes field:

The location of the SYSTAB table would be supplied by information in the registry or an INI file whose location can always be found.


Drive and path related fields in the SYSTAB and LOCTAB tables.

cSys_Drive
System drive letter where the application resides. This may be on the user's local drive, the file server, or on another peer computer in the network. Referred to as the "system drive."

cLoc_Drive
Drive which is available for exclusive use by the user. This would normally be on the hard-drive of the user's computer but could be a drive mapping to an exclusive directory elsewhere on the network. Runtime information about the user's current drive such as SYS(5) could override information stored in the SYSTAB table. Referred to as the "local drive."

mDefault
The drive (optional) and path of the current directory while the application is executing. The drive is assumed to be the system drive unless another drive is specified.

mProj_Path
The path reference for finding the application project file. The project file is assumed to be on the system drive unless a drive letter is supplied.

mSys_Path
The standard search path while the application is executing. Each directory in this path is assumed to be on the system drive unless a drive letter precedes the directory path.

mLoc_Path
The standard path to the LOCTAB table on the user's local drive. The table is assumed to be on the local drive unless a drive letter is suplied.

mFF_Path
The path reference for finding the FoxFire application. Each directory in this path is assumed to be on the system drive unless a drive letter appears.

mZip_Path
The path reference for finding the ZIPCODE.DBF file. The drive is assumed to be on the system drive unless a drive letter appears.

mProcedure
The path and name of all procedure files needed by the application. Each file is assumed to be on the system drive unless a drive letter precedes the file path. (May not be needed if project file supplies this info.)

These fields also appear in each LOCTAB table which has an identical structure to the SYSTAB table. If no LOCTAB table exists on the local drive, one is created by making a copy of the SYSTAB table in the directory specified by cLoc_Drive and cLoc_Path.

The LOCTAB table is then opened for exclusive use by the current user. Any of its fields which are blank are filled in with the corresponding value from SYSTAB. If the directory location of LOCTAB is different from the value in SYSTAB, then the cLoc_Drive and cLoc_Path fields are set to the actual location.

At this point, SYSTAB is closed and all further needs for that information is supplied from LOCTAB. LOCTAB can also be used to save current information about user choices. Temporary cursors and local views would be created in the same directory as LOCTAB.
Peter Robinson ** Rodes Design ** Virginia
Reply
Map
View

Click here to load this message in the networking platform