Subject | Re: [firebird-support] function in stored procedure |
---|---|
Author | Helen Borrie |
Post date | 2003-08-13T06:24:37Z |
At 12:42 PM 13/08/2003 +0700, you wrote:
(not recommended unless it's restricted or aggregated)
Firebird 1.5. Otherwise, keep your own counter and do your DML in a loop.
it is null. Null is a state, not a value.
instead. So use exceptions to trap error conditions.
If you actually handle error conditions inside the SP and "swallow" them
somehow, you could maintain some useful values in output variables
(parameters), e.g. count of successful and unsuccessful operations.
In 1.5, you can use the EXCEPTION feature to pass a run-time string back to
the client in the error status array.
heLen
>I want to know how to getselect count(*) from ...
>1. row count in select process
(not recommended unless it's restricted or aggregated)
>2. row affected in insert/update/delete processDepends on version. The context variable ROW_COUNT is available in
Firebird 1.5. Otherwise, keep your own counter and do your DML in a loop.
>3. null valueThere is no such thing as "null value". A data item either has a value or
it is null. Null is a state, not a value.
>4. if error occur (primary key /foregn key)If a SP fails, it won't return any parameters, but an error status array
>in stored procedure, so i can send it to return parameter with my
>error message
instead. So use exceptions to trap error conditions.
If you actually handle error conditions inside the SP and "swallow" them
somehow, you could maintain some useful values in output variables
(parameters), e.g. count of successful and unsuccessful operations.
In 1.5, you can use the EXCEPTION feature to pass a run-time string back to
the client in the error status array.
heLen