Subject | Re: [firebird-support] FreeUDFLib alternative |
---|---|
Author | Helen Borrie |
Post date | 2004-04-21T00:05:35Z |
At 11:22 PM 20/04/2004 +0000, you wrote:
different-sized input parameters. The extfuncs.sql file with FreeUDFLib
even supplies one already done for you. :-)
declare external function f_lrTrim
cstring(254)
returns
cstring(254) /* free_it */
entry_point 'lrTrim' module_name 'FreeUDFLib.dll';
declare external function f_BiglrTrim
cstring(1024)
returns
cstring(1024) /* free_it */
entry_point 'lrTrim' module_name 'FreeUDFLib.dll';
As you see, these declarations use the same entry point - they are declared
to the database with different function names and parameter sizes. If you
want just one, declare just one. If you want a little'un and a big'un,
declare both.
You don't have to use the function names supplied in the SQL file. Just
make sure the names you use are unique in your database and that you don't
change the entry point names. I prefer to declare the module_name without
the extension, too, as this keeps the database portable across platforms.
/heLen
>Hello,It's fine to have multiple declarations for the same string function, using
>
>I need to use FreeUDFLib string functions such as f_lrtrim() or
>f_stringlength() on strings up to 1024 chars long. However most of
>the FreeUDFLib string routines work for chars up to 256, and string
>inputs over 256 chars result in overflow exceptions. Can anybody
>suggest alternatives or suggestions to work around this problem?
different-sized input parameters. The extfuncs.sql file with FreeUDFLib
even supplies one already done for you. :-)
declare external function f_lrTrim
cstring(254)
returns
cstring(254) /* free_it */
entry_point 'lrTrim' module_name 'FreeUDFLib.dll';
declare external function f_BiglrTrim
cstring(1024)
returns
cstring(1024) /* free_it */
entry_point 'lrTrim' module_name 'FreeUDFLib.dll';
As you see, these declarations use the same entry point - they are declared
to the database with different function names and parameter sizes. If you
want just one, declare just one. If you want a little'un and a big'un,
declare both.
You don't have to use the function names supplied in the SQL file. Just
make sure the names you use are unique in your database and that you don't
change the entry point names. I prefer to declare the module_name without
the extension, too, as this keeps the database portable across platforms.
/heLen