community.borland.com

Article #25464: Is it possible to access data from the database within a UDF?

Problem:
Is it possible to access data from the database within a UDF?

Solution:
/*******************************************************************************/
Note: The information in this article applies to InterBase v5.x
/********************************************************************************/



Although it is possible to access data from a UDF,  it is not recommended.

The purpose of UDF's is to perform short, discrete non-database operations
on atomic values.   Which is why UDF's have names like upper() and round() or
substr() etc. These operations manipulate the contents of a field and return
an adjusted value. They are often computationally intensive, but all the
data they require is passed as parameters.

If your needs don't fall into the above scenario then UDF's are not likely
to be the solution.

source:listserver

Last Modified: 26-OCT-00