I have created an implementation of the "template approach" discussed on this thread that doesn't involve any changes to ISQLFunction or anything. All existing functions (such as the ANSI trim functions) can utilize the fix immediately. The patch is available here. There is support for the criteria API and HQL with named parameters (in separate patches).
http://216.121.112.228/browse/NH-2318 I'm definitely interested in feedback on these patches. Though ordinal parameters aren't supported immediately with those patches, they do provide users with valuable bug fixes and ways to write far more powerful function templates. Looking further, it seems that ordinal parameters might be supported by improving the parameter translation mapping to support duplicated or missing ordinal parameters. I've started playing around there, but I wanted to see about the first two patches since I'm already pretty happy with those. Patrick Earl
