Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
My string is longer than 255 characters!!
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00693653
Message ID:
00693692
Vues:
31
How many parameters do you have? Would it be easier to just pass an array instead? Or you can pass a string and let the method parse it for you...


How many parameters VFP can handle (27 as I recall)?

BTW, it would be a better idea to call form's method something different, like ReturnMax, since MAX is a reserved VFP word. It should not be a problem, but just in case.

>Try to separte method name from the parameter and assign parameter to a string.
lcMethod = LEFT(lcBEFORE, AT( "(", lcBefore))
>lcParam = SUBSTR((lcBEFORE, AT( "(", lcBefore)+1) + "17, DIA A 18, DIA A 19, DIA A 20"
>nReturn = EVAL(lcMethod + "lcParam)")
This code isn't tested so you'll have to ajust it.
>
>>Sergey,
>>
>>The expression in lcBEFORE is as follows:
>>
>>"thisform.MAX("DIA A 1, DIA A 2, DIA A 3, DIA A 4, DIA A 5, DIA A 6, DIA A 7, DIA A 8, DIA A 9, DIA A 10, DIA A 11, DIA A 12, DIA A 13, DIA A 14, DIA A 15, DIA A 16, "
>>
>>I need to include the rest of my memo field in the string literal. The missing part is:
>>
>>"17, DIA A 18, DIA A 19, DIA A 20")"
>>
>>Does this help give you any ideas?
>>
>>Thanks,
>>
>>Joe
>>
>>
>>>255 is a limit on the size of the string literal not the string. What is the expression in lcBEFORE?
>>>
>>>>Hi there,
>>>>
>>>>I'm working in a VFP 5.0 application and attempting to assign a table's memo field to a string, which I then pass along to one of my form's procedures using the following command:
>>>>
>>>>nReturn = (&lcBEFORE)
>>>>
>>>>where lnBEFORE is my memo field, and in which nReturn is a numeric value returning either the MIN, MAX or AVG of the string of values (separated by commas) I've passed to the procedure. The procedure is working fine except when I have more than 255 characters (sometimes it's 300+ characters).
>>>>
>>>>Is there a way that I can get around the 255 string-length limit?
>>>>
>>>>Thanks for reading,
>>>>
>>>>Joe
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform