Subject Re: [firebird-support] Errorhandling in isql
Author Milan Babuskov
rcrfb wrote:
> running FB 1.0.3 on Linux I need to execute a lot of
> scripts using isql, sometimes also shell inline scripts
> like
> cat <<- EOT | isql .....
> <statement>
> <statement>
> EOT
>
> Now my questions:
> Is there any possibility to get the result of a sql statemetn
> within the (sql) script out of 'isql'?

I didn't quite undestand this one. Does -o switch help?

> Is there a possibility to exit the (sql) script depending on
> the result (SQLCODE?) of the previous statement?

No.

> Is there an analogous command (for 'isql') like
> 'WHENEVER .... EXIT ROLLBACK' (as in ORACLE).

No.

> I know, that
> this is an Firebird-ESQL statement, but is there something
> like that for 'isql'?

No.

I don't know what exactly you want to do, but I can guess.

If you run scripts by hand, just enter the isql interactively, and then
type:

in first_sql_from_file.sql;
in second_sql_file.sql;
...etc.

If you use PHP you can write simple script that would do isql-like
behavior, but you could add stuff like rollback on errors.

HTH

--
Milan Babuskov
http://fbexport.sourceforge.net