Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create cursor from object
Message
De
06/01/2012 21:04:50
 
 
À
06/01/2012 11:37:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Divers
Thread ID:
01532019
Message ID:
01532363
Vues:
36
>Thanks for sharing this.
>
>It ALMOST works... I've found 2 problems with my testing:
>
>1. String length of Character data can only be 254 max, so I added this code:
>
>CASE m.lcType == "C"
>	lnLen = Min(LEN(m.lvValue), 254)
>	lcFields = m.lcFields + "(" + LTRIM(STR(lnLen)) + ")"
>
>I suppose the real solution would be to use a Memo type in this case so that no data would be lost off the end of the string.
>
>
>2. it does not handle decimals properly, if the decimal values equate to 0.
>
>For instance, a value of 1.00 is resulting in a field of N(1), whereas it should be N(4,2). This is causing an error: "Field width or number of decimal place is invalid)"
>


You are welcome
:)

This is a very simple and basic function, so you must extend it for production use.
Regards,
Ony
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform