Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Network Resource Files
Message
From
14/12/2001 12:56:17
 
 
To
14/12/2001 11:06:30
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Installation, Setup and Configuration
Miscellaneous
Thread ID:
00594453
Message ID:
00594510
Views:
17
Renoir,

I have done this before. I created a resource directory in the directory tree that also holds the \data directory or database, etc. so all user's resource files would be in one directory. In the resource directory, each user had their own resource created. I did this in application object's init method, but you could do it in your application's main.prg if you don't use an application object.

Here is my code:
PARAMETERS logname
IF VARTYPE(logname)!="C" .or. LEN(ALLTRIM(logname))<6
    IF VARTYPE(USERNAME)!="C" .or. LEN(ALLTRIM(USERNAME))<6
        logname=GETENV('USERNAME')
    ENDIF
ENDIF
IF LEN(ALLTRIM(logname))<6
    store "UNKNOWN" TO logname
ENDIF
WAIT WINDOW "Loading Work Order Entry Program and Enabling Security... "+logname+" ..." NOWAIT

* Setup resource file for user
LOCAL lcresource, lcSelect
lcSelect=SELECT()
STORE "\work\techsvcs\resource\"+UPPER(ALLTRIM(logname))+".DBF" TO lcresource
IF FILE (lcresource)
	SET RESOURCE TO &lcresource
ELSE
	USE \work\techsvcs\resource\foxuser.dbf  && generic resource file
	copy to (lcresource) with cdx            && create one for the user
	USE                                      && close it
	SET RESOURCE TO &lcresource              && make this their resource
ENDIF
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Reply
Map
View

Click here to load this message in the networking platform