Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL & UDF Weird Runtime Behavior
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00031218
Message ID:
00031250
Vues:
41
>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
Fil
Voir

Click here to load this message in the networking platform