Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SAVE TO mem var file?
Message
 
To
10/07/1998 12:43:37
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00116188
Message ID:
00116209
Views:
22
>>>Here is my code:
>>>
>>>restore from datapath addi
>>>mypath ="c:\one"
>>>setpath ="c:\two"
>>>save to datapath
>>>
>>>datapath only contains setpath and not both mypath and setpath.
>>>What did I do wrong?
>>
>>what are you trying to do?
>---
>I am trying to save the var mypath and setpath into datapath.mem...
Robert,

I don't know why your code isn't working. However, it is a much better design to sotre the path information in a DBF file in discrete fields than to use a mem file. Mem files are not multi-uer aware, there is no locking or contention management. One user will overwrite the changes of another user etc.. Using a dbf you can allow each user to have their own paths. An example of a DBF structure to do this is;
System.dbf
Field    Contents
UserName  The user's login name
DataPath  The path to this user's data
SetPath   The set path for this user
Then your code from above becomes;
LOCAL lcAlias
lcAlias = ALIAS()
IF NOT USED("System")
   SELECT 0
   USE System AGAIN ALIAS System
ELSE
   SELECT System
ENDIF
SET ORDER TO UserName
SEEK <The current logged in user name>
m.dataPath = System.DataPath
m.SetPath = System.SetPath
IF NOT EMPTY( lcAlias )
   SELECT (lcAlias )
ELSE
   SELECT 0
ENDIF
RETURN
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform