Information générale
Catégorie:
Codage, syntaxe et commandes
>Running VFP 3.0b
>
>I am creating an SQL Select statement that contains a UDF that passes the field name (the UDF essentially gets the first letter of each word in the field).
>
>The problem is that this works correctly in Development mode, but in the exe I am getting the whole text from the field. And, it looks as though the function is not getting called at all.
>
>i.e. SELECT GetLetter(PersonName) FROM .......
>
>FUNCTION GetLetter()
>PARAMETER jcField
>..
>..
>RETURN lcResult
Usually, is not a good practice to assume ANYTHING about table status/environment in a SQL SELECT. (e.g. don't call UDFs that are referencing a table unless there is no other way).
Try to pass the value of the field to your UDF instead of the field name. It should work fine.
Vlad
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement