Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple Question
Message
De
11/07/2003 17:19:15
 
 
À
11/07/2003 16:55:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00809233
Message ID:
00809436
Vues:
30
Thanks for trying..

>Check the properties of the hard drive itself in windows. Make sure enable write cache is not checked or that disable write cache IS checked for the hard drive. I cannot make the memory.mem file get corrupted to duplicate what is happening to you. I'm sorry.
>
>>Whats a write cache ? how to check if its enabled ? i'm using VFP 7 Sp1 and OS is W2K SP3.
>>
>>Did you try it , restarting vfp couple of times and running the program, it gets corrupted after restarting vfp.
>>
>>
>>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform