Subject RES: [firebird-support] UDF - Function Unknown why ?
Author Gerson Machado - Yahoo
Helen, tks.

I recreate the UDF like you sugest, and I see in RDB$FUNCTIONS to check
the name of this UDF and I certificate this is: addday, in
RDB$FUNCTION_NAME is lower case, but still wrong.

I check the UDF nullif and see this working good.

Please see my firebird.conf,
.
.
.
# ----------------------------
# External File Paths/Directories
#
# ExternalFileAccess may be None, Full or Restrict. If you choose
# Restrict, provide ';'-separated trees list, where external files
# are stored. Relative paths are treated relative to RootDirectory entry
# (see above). Default value 'None' disables any use of external files
# on your site. To specify access to specific trees, enum all required
# paths (for Win32 this may be something like 'C:\ExternalTables',
# for unix - '/db/extern;/mnt/extern').
#
# NOTE: THE EXTERNAL TABLE ENGINE FEATURE COULD BE USED TO COMPROMISE
# THE SERVER/HOST AS WELL AS DATABASE SECURITY!!
#
# IT IS STRONGLY RECOMMENDED THAT THIS SETTING BE USED TO LIMIT
# EXTERNAL TABLE LOCATIONS!
#
# Type: string (special format)
#
# ExternalFileAccess = F:\Firebird_1_5\UDF <<<<<< HELEN, IF I ATIVE THIS
LINE (AND STOP/START FB) THE ERROR STILL OCCURS


# ----------------------------
# External Function (UDF) Paths/Directories
#
# UdfAccess may be None, Full or Restrict. If you choose
# Restrict, provide ';'-separated trees list, where UDF libraries
# are stored. Relative paths are treated relative to RootDirectory entry
# (see above). Default value 'Restrict UDF' provides the same
restrictions
# as in FB 1.0. To specify access to specific trees, enum all required
# paths (for Win32 this may be something like 'C:\ExternalFunctions',
# for unix - '/db/extern;/mnt/extern').
#
# NOTE: THE EXTERNAL FUNCTION ENGINE FEATURE COULD BE USED TO COMPROMISE
# THE SERVER/HOST AS WELL AS DATABASE SECURITY!!
#
# IT IS STRONGLY RECOMMENDED THAT THIS SETTING BE USED TO LIMIT
# EXTERNAL FUNCTION LOCATIONS! SPECIALLY AVOID HAVING
# COMMON SUBTREES IN UdfAccess & ExternalFileAccess !
#
# Type: string (special format)
#
#UdfAccess = Restrict UDF


# ----------------------------
# Temporary directories
#
.
.
.

Again tks

Gerson



-----Mensagem original-----
De: Helen Borrie [mailto:helebor@...]
Enviada em: sexta-feira, 12 de novembro de 2004 09:32
Para: firebird-support@yahoogroups.com
Assunto: Re: [firebird-support] UDF - Function Unknown why ?



At 08:55 AM 12/11/2004 -0200, you wrote:

>I'm trying to use the function AddDay in fdudf.dll, I defined this UDF
>like:
>
>DECLARE EXTERNAL FUNCTION "addday"
> DATE,
> INTEGER
> RETURNS DATE
> ENTRY_POINT 'addDay' MODULE_NAME 'fbudf';
>
>I compiled and all right, but when I use I received this:
>
>select date_insert, addday(date_insert, 5)
> from mytable
>
>fmSQLEditor.Query:
>An error was found in the application program input parameters for the
>SQL statement.
>Dynamic SQL Error.
>SQL error code = -804.
>Function unknown.
>ADDDAY.
>
>What is wrong ?

Because you declared the function name in quotes, you have made it force

you to use it exactly that way. The function name is now "addday", not
ADDDAY. You have made it case-sensitive and you must use the quotes.

Tip: Do this:

DROP EXTERNAL FUNCTION "addday";
commit;

DECLARE EXTERNAL FUNCTION addday
DATE,
INTEGER
RETURNS DATE
ENTRY_POINT 'addDay' MODULE_NAME 'fbudf';

./heLen




Yahoo! Groups Sponsor

ADVERTISEMENT
HYPERLINK
"http://us.ard.yahoo.com/SIG=129h5b0cb/M=298184.5584357.6650215.3001176/
D=groups/S=1705115386:HM/EXP=1100345468/A=2426683/R=0/SIG=11eeoolb0/*htt
p://www.netflix.com/Default?mqso=60185400"click here
HYPERLINK
"http://us.adserver.yahoo.com/l?M=298184.5584357.6650215.3001176/D=group
s/S=:HM/A=2426683/rand=594323845"


_____

Yahoo! Groups Links


* To visit your group on the web, go to:
HYPERLINK
"http://groups.yahoo.com/group/firebird-support/"http://groups.yahoo.com
/group/firebird-support/


* To unsubscribe from this group, send an email to:
HYPERLINK
"mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe
"firebird-support-unsubscribe@yahoogroups.com


* Your use of Yahoo! Groups is subject to the HYPERLINK
"http://docs.yahoo.com/info/terms/"Yahoo! Terms of Service.



---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.792 / Virus Database: 536 - Release Date: 9/11/2004



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.792 / Virus Database: 536 - Release Date: 9/11/2004



[Non-text portions of this message have been removed]