Subject | Re: [ib-support] nested procedures |
---|---|
Author | Claudio Valderrama C. |
Post date | 2002-02-01T07:46:47Z |
""kisa933"" <kiss.sandor@...> wrote in message
news:a3bpp5+pgkr@......
FROM PROC_A(:VAR_INPUT)
INTO :VAR_OUTPUT1;
If your code is correct, are you sure that PROC_A uses an input param whose
type can handle all the range of the passed argument? If A and D have
similar logic, it's possible that A's input param is a smallint but D is
passing an integer... good cause for an arithmetic exception.
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing
news:a3bpp5+pgkr@......
>Are you sure this is the code? It seems that you want instead
>
> CREATE PROCEDURE PROC_D(
> VAR_INPUT SMALLINT)
> RETURNS (
> VAR_OUTPUT1 INTEGER)
> AS
> DECLARE VARIABLE VAR_LOCAL INTEGER;
> BEGIN
>
> ...
>
> IF VAR_LOCAL = SOMETHING THEN
> SELECT VALUE_NUMERIC
> FROM PROC_A(:VAR_OUTPUT)
> INTO :VAR_OUTPUT1;
> ELSE
> VAR_OUTPUT = 0;
> SUSPEND;
> END
FROM PROC_A(:VAR_INPUT)
INTO :VAR_OUTPUT1;
If your code is correct, are you sure that PROC_A uses an input param whose
type can handle all the range of the passed argument? If A and D have
similar logic, it's possible that A's input param is a smallint but D is
passing an integer... good cause for an arithmetic exception.
C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing