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