As far as I understood you comment (english is not my first language), 
executing script could not provided specified resultcode because many fails can 
occur and exitcode is only one? 

But multiple fails can occurs on long cmdline too. What happens on this case? 
My logic says the internal sqlite command parser stop on first error founded, 
set-up exitcode, print error message and terminate. After correction this 
error, than start displaying second error, until all errors are corrected 
(ideal).

L.

> On Sat, Mar 14, 2015 at 7:33 AM, Petr L?z?ovsk? <lazna at volny.cz>wrote:

> Just discovered the resulcodes differ if perform:

>  ----------------------------------------
>  sqlite3.exe %db% < script.sql

>  the %errorlevel% is 1
>  ------------------------

>  but by

>  ------------------------
>  sqlite3.exe %db% "UPDATE table SET 'xxxx=yyyy'";

>  the errorlevel is 19 (correct as by 
> "https://www.sqlite.org/c3ref/c_abort.html";)
>  ----------------------------------------------

>  both command produce same (correct) erromessage:

>  Error: near line 1: UNIQUE constraint failed: table.xxxx



>  Why I got different exitcodes? Is is possible to get proper exitcode if 
> command loaded from script file too?



> According to your logic ...which error code do you believe should be returned 
> if a plurality of the SQLite statements in your piped script file were to 
> cause some variety of different  error events?



> --
>    --
>       --
>          --???--
>         K e V i N

>  


Reply via email to