Subject | Re: TO_CHARD Error (Udf4ORA UDF function) |
---|---|
Author | Adam |
Post date | 2007-02-22T23:13:44Z |
--- In firebird-support@yahoogroups.com, "Panos Bairaktaris"
<panoramix95@...> wrote:
what it returns, whether you are declaring it correctly etc.
Does the select 'work properly' without the create view statement.
eg, if I had
CREATE VIEW V_BAR (FOO) AS SELECT FOO FROM BAR;
and
SELECT * FROM V_BAR;
was giving me problems, the first thing I would check is
SELECT FOO FROM BAR;
You have not told us your view definition or the SQL statement
underlying your view definition. If the underlying SQL does work on
its own, then the problem is most likely to be the view not guessing
the data type returned by the UDF. Wrapping the field in a Cast(? as
Varchar(255)) should fix that.
If the underlying select does not work, it may be data related. Are
you sure you are not passing a null into the UDF?
<panoramix95@...> wrote:
>http://perso.orange.fr/Udf4ORA/ in Firebird 1.5.
> Hi,
> I've installed these UDF funcitons from
>Rfunc is a third party library, not part of Firebird. I have no idea
> DECLARE EXTERNAL FUNCTION TO_CHAR
> CSTRING(255)
> RETURNS CSTRING(255)
> ENTRY_POINT 'fn_to_char' MODULE_NAME 'rfunc';
>
> DECLARE EXTERNAL FUNCTION TO_CHARD
> TIMESTAMP,
> CSTRING(255)
> RETURNS CSTRING(255) FREE_IT
> ENTRY_POINT 'fn_to_chard' MODULE_NAME 'rfunc';
>
what it returns, whether you are declaring it correctly etc.
Does the select 'work properly' without the create view statement.
eg, if I had
CREATE VIEW V_BAR (FOO) AS SELECT FOO FROM BAR;
and
SELECT * FROM V_BAR;
was giving me problems, the first thing I would check is
SELECT FOO FROM BAR;
You have not told us your view definition or the SQL statement
underlying your view definition. If the underlying SQL does work on
its own, then the problem is most likely to be the view not guessing
the data type returned by the UDF. Wrapping the field in a Cast(? as
Varchar(255)) should fix that.
If the underlying select does not work, it may be data related. Are
you sure you are not passing a null into the UDF?