Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is it possible to store a VFP object in a table?
Message
De
04/12/2007 09:31:28
Mike Sue-Ping
Cambridge, Ontario, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01272898
Message ID:
01273038
Vues:
24
>Hi Mike,
>
>> having thought about it more though, the XML should be just as easy to generate and use.
>
>Once you wrote the code or if use the one from Rick, yes. If you need something non-generic, it's also not hard. A generic approach using XML is more difficult, though. You have to
>
>- Deal with various data types like datetime values before 1601, boolean, currency
>
>- Deal with properties that are NULL
>
>- Handle binary data properly, eg. CHR(0). This most likely requires hex or base 64 encoding which defeats the readability of XML
>
>- Store one and more-dimensional arrays
>
>- deal with the precision of numeric values. 1.0 is different from 1.00 for VFP as VFP keeps track of the number of decimal places
>
>- Deal with rounding issues. Numbers change when you convert them to strings, even with the highest precision. The following expression, for instance, returns .F.: (Val(Padr(1/3,21))) = (1/3). That's important if the object contains calculated values.

Thanks for the headsup. I'll be taking a non-generic approach here so hopefully I'll be able to avoid those issues.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform