Subject RE: [firebird-support] FreeAdHocUDF
Author Pekka Paunio

You are probably right. Installing FreeAdHocUDF is tedious.

 

Cunting workweekdays can even be done with simple select statement.

 

Pekka

 

From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Ivan Prenosil
Sent: 17. huhtikuuta 2014 10:59
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] FreeAdHocUDF

 

 

> I’ve got a problem installing FreeAdHocUDF on FB2.5.2.26540.

...
> I have palced all dll’s as instructed and renamed main dll as suggested.
...
> Install sql: (need only this UDF)
> DECLARE EXTERNAL FUNCTION F_COUNTWEEKDAYS

You need only this single function from FreeAdHocUDF ?
Then write your own udf without all those crazy dependencies.

I guess all is caused by calling isc_decode_date() from firebird
client library. If you write your own udf in Delphi or FreePascal,
then converting date from firebird format into TDateType
is as simple as
D := F - 15018;

Ivan