Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple Question
Message
From
11/07/2003 16:30:58
 
 
To
11/07/2003 12:55:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00809233
Message ID:
00809410
Views:
32
Thanks Tracy for trying..


Could you check this (VFP 7) if it happens in your machine. Then below is the contents of the memory file,my form is very simple with 2 spinner buttons and 2 command buttons Save and cancel

in the init of the form i have
RESTORE FROM "forms\quarter.mem" ADDITIVE
thisform.spinner1.Value = m.mvcuryrminnhdba
thisform.spinner2.Value = m.mvcuryrminhcdba

in the save button i have
SET ECHO OFF
SET SAFETY OFF
WAIT WINDOW "Please wait saving changes..." TIMEOUT .5
m.mvcuryrminnhdba=thisform.spinner1.Value
m.mvcuryrminhcdba=thisform.spinner2.Value
IF TYPE('mvMasterupd')<>"N"
messagebox('Corrupted')
endif
SAVE TO "forms\quarter.mem"
Thisform.Release

after changing couple of times the value of both the spinner buttons, the mem file gets corrupted.

Can you reproduce this , i would really appreciate this.


Quarter.mem file contents

MVQUARTER_Q
Pub N 3 ( 3.00000000)
MVQUARTER_Y
Pub N 2001 ( 2001.00000000)
MVCURYRMINNHDBA
Pub N 150 ( 150.00000000)
MVCURYRMINHCDBA
Pub N 74 ( 74.00000000)
MVPREVYRMINNHDBA
Pub N 141 ( 141.00000000)
MVPREVYRMINHCDBA
Pub N 70 ( 70.00000000)
MVMASTERUPD
Pub N 12 ( 12.00000000)
MVMASTERUPDSRUN
Pub N 0 ( 0.00000000)




>It works both ways for me testing with your variables in fact. I would check that the variable actually exists using IF TYPE('mvMasterupd')<>"N" or something similar and trapping for the variable not existing before saving to memory.mem. It must be released somewhere before under specific conditions somehow...
>
>
>>Hello
>>
>>Does
>>
>>Save to forms\memory.mem
>>different from
>>Save to "forms\memory.mem"
>>
>>like wise
>>
>>Restore from forms\memory.mem addi
>>different from
>>restore from "forms\memory.mem" addit
>>
>>Reason i ask is my memory file get corrupted sporadically.In my mem file i have
>>
>>mvMasterupd=2
>>mvCuryrHigh=2003
>>mvCuryr=9
>>
>>Some times when the program runs, it displays mvMasterupd not found, so when i check the mem file, i has only two entries and mvMasterupd is missing.
>>
>>Any ideas ?
>>
>>Txs
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform