Just discovered the resulcodes differ if perform:
sqlite3.exe %db% < script.sql
the %errorlevel% is 1
but by
sqlite3.exe %db% "UPDATE table SET '='";
the errorlevel is 19 (correct as by
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
Have some shell scripts working with sqlite. Receiving incoming payments from
bank via HTTP API and pushing it into database. This script will start
periodically, every single hour.
Want to prevent situation only few payments are written and script failed for
some reason. Have read about
Thanks to all answers. Are principles of such script OK, or I miss something?
set "_error="
sqlite3.exe %db% BEGIN;
for /f "tokens=2,3 delims=," %%a in (data.csv) do (
sqlite3 %db% "INSERT INTO payments(id,amount) VALUES
('%%a','%%b')";
if
> SQL commands do not need to be on multiple lines (they only need a
> semicolon after each command).
> But dot commands do.
Good to know
> Have you tried the following?
> (ECHO .bail on
> ECHO %multiple commands%) | sqlite3.exe %dbname%
This could be solution, thanks
> But, much more
There is a major difference: You are talking about SSH and Linux, this
combination running on hundred milions of network devices accross whole
internet. Thus develop intruding scripts does make sense. But I am using
Windows shell scripts as CGI, which is EXTREMELY rare. Who will study this
> 1. Security through obscurity is your first mistake. There is no such thing.
Interesting It does not exist, but it have article on wikipedia. Sounds
like UFO or Yetti...
> 2. Assuming that nobody is writing CGI scripts on Windows Servers is your
> next mistake. A lot of systems still
I would like thanks to all contributors of this interesting debate, for their
effort.
L.
> As with Rob, this is my final say as well.
> On Fri, Sep 11, 2015 at 1:38 PM, Petr L?z?ovsk? wrote:
>> 1. Security through obscurity is your first mistake. There is no such thing.
>
>
Have following table:
CREATE TABLE ip_addr
(
/*! Person identificator (PID) %%a */ pid INTEGER PRIMARY KEY NOT NULL,
/*! IP address %%b */ ip_addr VARCHAR (16) NOT NULL,
/*! Status: 0 - Allowed, Unassigned to specific customer (blocked) */
/*! Status: 1 - Allowed, Asigned to concrete customer */
I had googled to verify such idea before, but have no luck.
Thanks, L.
> Hello Petr,
> defining the column pid as INTEGER PRIMARY KEY you added an implicit
> contraint; a primary key means that only one record with a given value
> of pid can exist in the table.
> See
Thay track all of us and "optimalise" search results. My list of links could
differ from yours.
I have googled key phrase '"UNIQUE constraint failed:" sqlite primary key' and
similar, but not read whole received documents, perform only brief look on it.
This is best practice by my experience,
Looking for %subj%, unable to find 'sqlite3.exe' with ICU extensions. Does it
exist at all? If yes, couls anyone post link?
thanks L.
have windows batch working with sqlite, may I insert image into database and
than read this images from?
L.
___
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>> have windows batch working with sqlite, may I insert image into database and
>> than read this images from?
> Convert your image into a BLOB and store it as a BLOB. BLOBs are just runs
> of bytes -- you can store anything you want as a BLOB.
What you mean by "Convert image into a BLOB" is
> On 18 Jan 2012, at 12:30pm, Petr Lázňovský wrote:
>>>> have windows batch working with sqlite, may I insert image into database
>>>> and than read this images from?
>>> Convert your image into a BLOB and store it as a BLOB. BLOBs are just runs
>>>
Because of packing. The script should be distributable as one .cmd file, the
database engine and database itself will be embeded inside od script. Dealing
with embeded files in the shell script is not easy thus I want to minimize its
number.
L.
> On Jan 18, 2012, at 12:00 PM, Petr Lázňov
> Sorry, 'windows batch' doesn't mean anything to me.
http://en.wikipedia.org/wiki/Batch_file
but wikipedia is reasonlessly turned off today
___
sqlite-users mailing list
sqlite-users@sqlite.org
Look like script for different platform, but "od" and "tr" are available also
for Win so I will try...
> On Wed, 18 Jan 2012 13:30:49 +0100, Petr Láz?ovský
> wrote:
have windows batch working with sqlite, may I insert image into database
and than read this images
> On Thu, Jan 19, 2012 at 1:49 AM, Kevin Benson <kevin.m.ben...@gmail.com>wrote:
>> On Wed, Jan 18, 2012 at 8:16 PM, Simon Slavin <slav...@bigfraud.org>wrote:
>>> On 18 Jan 2012, at 11:13pm, Petr Lázňovský wrote:
>>> > Look like scrip
19 matches
Mail list logo