Subject | Re: [firebird-support] Re: Errorhandling in isql |
---|---|
Author | Milan Babuskov |
Post date | 2004-03-31T15:18:31Z |
rcrfb wrote:
php -f script.php
You can use php's interbase module, or kinderbasdb for Python to "talk"
to database.
FBExport that returns 0 on success, and negative numbers on error.
However, it can only execute inline scripts, so you would have to create
the entire lines by yourself, for example:
fbexport -X -D/path/to/db -Q "EXECUTE PROCEDURE xyz..."
since it would be a really useful feature.
I'm even considering to add this feature to fbexport... until then, I
still suggest you to use PHP or Python or even C++ (via IBPP) for this.
--
Milan Babuskov
http://fbexport.sourceforge.net
> As I mentioned above, I'm doing (nightly) batch jobs using eitherYou could use PHP or Python inside bash scripts.
> bash or ksh scripts. Within these scripts in need to do different
> things in case one (or more) SQL statements fail, so I need the
> result status of the isql command.
php -f script.php
You can use php's interbase module, or kinderbasdb for Python to "talk"
to database.
> It will help me if the isql exists with failure status if anyUnfortunatelly, isql always return the same value. You can try my tool
> sql statement fails.
FBExport that returns 0 on success, and negative numbers on error.
However, it can only execute inline scripts, so you would have to create
the entire lines by yourself, for example:
fbexport -X -D/path/to/db -Q "EXECUTE PROCEDURE xyz..."
> But it will be better if I could decide forWhat you need does not exists, but you can add feature request for isql,
> each statement which result code to return (depending on the SQLCODE
> of the statement) or only do a rollback and continue with the
> next sql statements.
since it would be a really useful feature.
I'm even considering to add this feature to fbexport... until then, I
still suggest you to use PHP or Python or even C++ (via IBPP) for this.
--
Milan Babuskov
http://fbexport.sourceforge.net