General information
Category:
Coding, syntax & commands
>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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only