Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Figuring out VFP crashes
Message
 
 
À
01/03/2017 14:03:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
MS SQL Server
Divers
Thread ID:
01648682
Message ID:
01648689
Vues:
99
>>>- Convert the SCX to text (SC2) with FoxBin2Prg and back to SCX: Sometimes the VCX/SCX table have some corruption in metadata that can cause this problems (normally, duplicated records). Others have solved this kind of problems (look at Msg.ID 1634833)
>>
>>I haven't yet tried your program - can you please post a link and tell if it would preserve a very complex form based on a class with ActiveX? Of course, I do have backups (in TFS).
>>
>
>Yeah, here it is:
>
>https://vfpx.codeplex.com/releases/view/116407
>
>For a quick setup, please read this help page:
>https://vfpx.codeplex.com/wikipage?title=FoxBin2Prg
>
>It is on Thor tool too, in case you use it, and in it there is an option that create some "SendTo" shortcuts for you.

Ok, I'll do it. I also checked the code, there are no type checks, only vartype, although there is one method I don't like much:
with thisform
   lcAlias = .parse(tcFieldList, "ALIAS")
   lcAlias = iif(empty(m.lcAlias), alias(), m.lcAlias)
   if !empty(m.lcAlias)
      lnFields = afields(laFlds)
      for lnI = 1 to lnFields
         lcField     = laFlds[lnI, 1]
         lcType      = laFlds[lnI, 2]
         lcMemvar    = "m." + m.lcField
         lcPassedVal = .parse(tcFieldList, lcField)
         if vartype(m.lcMemvar) = "U"
            public &lcMemvar
         endif
         do case
            case lcType $ "NFIBY"
               lxVal = val(nvl(lcPassedVal,"0"))
            case lcType = "D"
               lxVal = ctod(nvl(lcPassedVal,"{^1900-01-01}"))
            case lcType = "T"
               lxVal = ctot(nvl(lcPassedVal,"{^1900-01-01}"))
            case lcType = "L"
               lxVal = upper(nvl(lcPassedVal,""))=".T."
            otherwise						&&"C" "M"
               lxVal = nvl(lcPassedVal,"")
         endcase
         STORE lxVal TO (m.lcMemvar )
      next lnI
   endif   
endwith
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform