in reply to sqlplus or DBI

Found something usefull on google groups just now.

Adding whenever sqlerror exit failure to my sql makes sqlplus return an error code > 0. So I'll be using that untill i hear of something better.
Any way I can do the same thing using DBI ?

thanks,
Paul

Replies are listed 'Best First'.
Re: Re: sqlplus or DBI
by fruiture (Curate) on Nov 18, 2002 at 19:30 UTC

    Yes, you can do the same thing with DBI. It would be even better...

    The easy way ist to slurp the sql-commands-file and directly submit it to $dbh->prepare( $commands )->execute

    Mor advanced would be to parse the SQL beforehand and submit the queries one after the other. In fact, you only have to split on semicolon, except semicolons in quotes.

    --
    http://fruiture.de