Subject | RE: [firebird-support] rFunc UDF - linux and Windows |
---|---|
Author | Codebue Fabio - P-Soft |
Post date | 2008-03-08T13:12:43Z |
[quote helen]
The fbudf ROUND function passes and returns its arguments and result BY
DESCRIPTOR. That means that the engine will take care of details like scale
and precision in the input argument and return the expected result. It
*doesn't* mean that a real is an invalid input argument -- unless you pass
one that has too much precision, i.e., a double precision or a numeric with
precision > 9.
[/quote helen]
I tried with some of my trigger ( I have about 60 to translate... ) but
nothing todo... Here an example
CREATE TRIGGER T_LCR_AIUD_AGGIORNA_LCT FOR LCR
ACTIVE AFTER INSERT OR UPDATE OR DELETE POSITION 10
AS
declare variable quantita_tum float;
declare variable quantita float;
declare variable progressivo integer;
begin
...
if (updating) then
begin
progressivo = old.progressivo;
quantita_tum = i64round(new.quantita_tum - old.quantita_tum, 4);
quantita = i64round(new.quantita - old.quantita, 4);
end
...
but an error was caused with this cause esecution
Invalid data type, length, or value.
function I64ROUND could not be matched.
some idea?
which are difference sing by descripting parameter when I have to call a un
UDF function from one that use double parameter?
Codebue Fabio
.-----------------------------.
_ \ __| _||
__/____|\__ \ _ \ _| _|
_| ____/\___/_| \__|
P-Soft di Codebue Fabio & C. sas
via B.Storti, 19
24060 - Chiuduno - BG
Italy
Phone: +39.030.839435
Fax: +39.030.5100306
Mobile: +39.348.3515786
.-----------------------------.
Web : www.p-soft.biz
EMail: f.codebue@...
The fbudf ROUND function passes and returns its arguments and result BY
DESCRIPTOR. That means that the engine will take care of details like scale
and precision in the input argument and return the expected result. It
*doesn't* mean that a real is an invalid input argument -- unless you pass
one that has too much precision, i.e., a double precision or a numeric with
precision > 9.
[/quote helen]
I tried with some of my trigger ( I have about 60 to translate... ) but
nothing todo... Here an example
CREATE TRIGGER T_LCR_AIUD_AGGIORNA_LCT FOR LCR
ACTIVE AFTER INSERT OR UPDATE OR DELETE POSITION 10
AS
declare variable quantita_tum float;
declare variable quantita float;
declare variable progressivo integer;
begin
...
if (updating) then
begin
progressivo = old.progressivo;
quantita_tum = i64round(new.quantita_tum - old.quantita_tum, 4);
quantita = i64round(new.quantita - old.quantita, 4);
end
...
but an error was caused with this cause esecution
Invalid data type, length, or value.
function I64ROUND could not be matched.
some idea?
which are difference sing by descripting parameter when I have to call a un
UDF function from one that use double parameter?
Codebue Fabio
.-----------------------------.
_ \ __| _||
__/____|\__ \ _ \ _| _|
_| ____/\___/_| \__|
P-Soft di Codebue Fabio & C. sas
via B.Storti, 19
24060 - Chiuduno - BG
Italy
Phone: +39.030.839435
Fax: +39.030.5100306
Mobile: +39.348.3515786
.-----------------------------.
Web : www.p-soft.biz
EMail: f.codebue@...