Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple Question
Message
From
11/07/2003 16:37:45
 
 
To
11/07/2003 16:30:58
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00809233
Message ID:
00809412
Views:
30
I see what you are trying to do now. We do the same thing. We have some agency setup information that is saved to memory files on the hard drive. They have never gotten corrupted yet. Of course, they typically don't go in and do numerous saves, but edit the form once and save the values. We do not use the quotes either when saving to the file. Still I cannot duplicate corrupting the memory file by doing rapid saves to the same memory file. Is it possible that write cache is enabled on your pc? What OS are you using? What version of VFP? Maybe someone else can duplicate your problem, but I cannot make it happen. I would recommend that you verify the type of value in the spinner buttons before you save their values too though.

>Thanks Tracy for trying..
>
>Could you check this 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
.·*´¨)
.·`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
Next
Reply
Map
View

Click here to load this message in the networking platform