[sqlite] BEGINNER - Transactions in shell script

2015-09-13 Thread Petr Lázňovský
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. > >

[sqlite] BEGINNER - Transactions in shell script

2015-09-12 Thread Stephen Chrzanowski
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. > > Interesting It does not exist, but it have article on wikipedia. > Sounds like UFO or Yetti... >

[sqlite] BEGINNER - Transactions in shell script

2015-09-12 Thread Rob Willett
Petr, Since this is the SQLite mailing list, we are moving away from the intentions of the list, however I think your points need addressing as they may be relevant to other people using this mailing list. I apologise to other people if this is off topic but I think its important enough to

[sqlite] BEGINNER - Transactions in shell script

2015-09-11 Thread Petr Lázňovský
> 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

[sqlite] BEGINNER - Transactions in shell script

2015-09-11 Thread Rob Willett
Petr, You are making a number of fundamental mistakes with your security. 1. Security through obscurity is your first mistake. There is no such thing. 2. Assuming that nobody is writing CGI scripts on Windows Servers is your next mistake. A lot of systems still do this, a lot of old systems

[sqlite] BEGINNER - Transactions in shell script

2015-09-11 Thread Petr Lázňovský
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

[sqlite] BEGINNER - Transactions in shell script

2015-09-11 Thread Petr Lázňovský
> 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

[sqlite] BEGINNER - Transactions in shell script

2015-09-11 Thread Stephen Chrzanowski
You'd be surprised by what is out there trying to get into your system. I had port 22 open on my home router to go to a Linux machine so I could SSH into my home network from anywhere in the world, even though I rarely ever leave the 519 area code. One day I went to look at my messages log file

[sqlite] BEGINNER - Transactions in shell script

2015-09-11 Thread John McKown
On Fri, Sep 11, 2015 at 6:51 AM, Stephen Chrzanowski wrote: > You'd be surprised by what is out there trying to get into your system. > > I had port 22 open on my home router to go to a Linux machine so I could > SSH into my home network from anywhere in the world, even though I rarely > ever

[sqlite] BEGINNER - Transactions in shell script

2015-09-07 Thread Barry
SQL commands do not need to be on multiple lines (they only need a semicolon after each command). But dot commands do. Have you tried the following? (ECHO .bail on ECHO %multiple commands%) | sqlite3.exe %dbname% But, much more importantly (particularly since you included BEGINNER in big letters

[sqlite] BEGINNER - Transactions in shell script

2015-09-07 Thread Simon Slavin
On 7 Sep 2015, at 8:00am, Petr L?z?ovsk? wrote: > Uhgh Spent lot of time to made whole scripts bundle to use no tempfiles > (avoiding I/Os), and not this ;-) > OK, few more questions: > > Does sqlite3 expect exactly one statement per one line on input? > Or put it into command line?

[sqlite] BEGINNER - Transactions in shell script

2015-09-06 Thread Rowan Worth
On 6 September 2015 at 18:26, Luuk wrote: > > Suppose i have 'test.sql': > .echo on > DELETE FROM test; > BEGIN; > INSERT INTO test VALUES(1,'test1'); > INSERT INTO test VALUES(3,'test3',3); > INSERT INTO test VALUES(2,'test2'); > COMMIT; > SELECT * FROM test; > > And a database 'test.sqlite'

[sqlite] BEGINNER - Transactions in shell script

2015-09-06 Thread Luuk
On 06-09-15 20:46, Petr L?z?ovsk? wrote: > 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

[sqlite] BEGINNER - Transactions in shell script

2015-09-06 Thread Petr Lázňovský
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

[sqlite] BEGINNER - Transactions in shell script

2015-09-06 Thread Simon Slavin
On 6 Sep 2015, at 7:46pm, Petr L?z?ovsk? wrote: > Thanks to all answers. Are principles of such script OK, or I miss something? Sorry you cannot script sqlite.exe like that. Each time you run it is a separate session. your BEGIN has no useful effect. Simon.

[sqlite] BEGINNER - Transactions in shell script

2015-09-06 Thread Simon Slavin
On 6 Sep 2015, at 2:26pm, Yuriy M. Kaminskiy wrote: > Not quite. Even if some statement failed, if you COMMIT in the end, it > will succeed and database will be (partially) modified. > > It's application developer responsibility to check for errors and issue > ROLLBACK instead of COMMIT, if

[sqlite] BEGINNER - Transactions in shell script

2015-09-06 Thread Luuk
On 06-09-15 15:26, Yuriy M. Kaminskiy wrote: > Luuk writes: > >> DELETE FROM test; >> BEGIN; >> INSERT INTO test VALUES(1,'test1'); >> INSERT INTO test VALUES(3,'test3',3); >> INSERT INTO test VALUES(2,'test2'); >> COMMIT; >> SELECT * FROM test; > (and normally I'd expect to see DELETE *inside*

[sqlite] BEGINNER - Transactions in shell script

2015-09-06 Thread Yuriy M. Kaminskiy
Luuk writes: > On 05-09-15 22:27, Simon Slavin wrote: >> On 5 Sep 2015, at 9:18pm, Petr L?z?ovsk? wrote: >> >>> 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

[sqlite] BEGINNER - Transactions in shell script

2015-09-06 Thread Luuk
On 05-09-15 22:27, Simon Slavin wrote: > On 5 Sep 2015, at 9:18pm, Petr L?z?ovsk? wrote: > >> 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

[sqlite] BEGINNER - Transactions in shell script

2015-09-05 Thread R.Smith
On 2015-09-05 10:18 PM, Petr L?z?ovsk? wrote: > 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

[sqlite] BEGINNER - Transactions in shell script

2015-09-05 Thread Petr Lázňovský
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

[sqlite] BEGINNER - Transactions in shell script

2015-09-05 Thread Simon Slavin
On 5 Sep 2015, at 9:18pm, Petr L?z?ovsk? wrote: > 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

Re: [sqlite] beginner question: help required to retrieve "filename" from an open "sqlite3*" handle

2011-02-04 Thread Simon Davies
On 4 February 2011 07:38, Andreas Otto wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi, > > with "sqlite2_open" the parameter "filename" is used to specify the > database location. > > Q: how I can retrieve this parameter from an open handle?

[sqlite] beginner question: help required to retrieve "filename" from an open "sqlite3*" handle

2011-02-03 Thread Andreas Otto
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, with "sqlite2_open" the parameter "filename" is used to specify the database location. Q: how I can retrieve this parameter from an open handle? sqlite-version: latest mfg, Andreas Otto -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.15

Re: [sqlite] beginner

2010-12-23 Thread Simon Slavin
On 24 Dec 2010, at 2:05am, Bob Keeland wrote: > Is there anything like SQLite-Manager that works for those of us who still > use Microsoft software? I would suggest you download and install FireFox even if you intend to keep using Internet Explorer for your normal web browsing. The two

Re: [sqlite] beginner

2010-12-23 Thread Bob Keeland
considering a dabble with LINUX, but have not made the jump yet.   Bobby Keeland --- On Thu, 12/23/10, stormtrooper <lewis.mil...@gmail.com> wrote: From: stormtrooper <lewis.mil...@gmail.com> Subject: Re: [sqlite] beginner To: sqlite-users@sqlite.org Date: Thursday, December 23, 20

Re: [sqlite] beginner

2010-12-23 Thread stormtrooper
Srinidhi, I recommend Sqlite-manager, a free tool which runs inside Mozilla FireFox, to help build your queries and view the table,rows, etc. http://code.google.com/p/sqlite-manager/ Keith -- View this message in context: http://old.nabble.com/beginner-tp30480116p30523978.html Sent from

Re: [sqlite] beginner

2010-12-17 Thread George Roberge
I have that book, also, and it is OK, but I ordered it online and didn't realize how much of it was dedicated to incorporating SQLite into applications. Of course, "Using SQLite" is the title, after all... I have SQL for Dummies, too, which I think is a nice supplement. One more thing:

Re: [sqlite] beginner

2010-12-17 Thread john darnell
r 17, 2010 9:01 AM > To: General Discussion of SQLite Database > Subject: Re: [sqlite] beginner > > On Fri, Dec 17, 2010 at 08:42:54AM -0600, john darnell scratched on the wall: > > > I am learning SQLite based on the O'Reilly book by Jay Kreibich, > > called &q

Re: [sqlite] beginner

2010-12-17 Thread Jay A. Kreibich
On Fri, Dec 17, 2010 at 08:42:54AM -0600, john darnell scratched on the wall: > I am learning SQLite based on the O'Reilly book by Jay Kreibich, > called "USING SQLITE," which came out in August of this year, so > it's pretty up to date. I hope you're finding it useful. -j -- Jay A.

Re: [sqlite] beginner

2010-12-17 Thread john darnell
Hello Srindhi: From one SQLite beginner to another... SQLite and SQL are two different subjects. So you need to clarify for yourself what you want to do. Do you want to learn SQL? Then there are a number of good books you can get from Amazon to help you learn, and there are a number

Re: [sqlite] beginner

2010-12-17 Thread Simon Slavin
On 17 Dec 2010, at 11:43am, Srinidhi Rao wrote: > I am interested to learn the nuances of a SQL but I have no background of > using one as I am an electronics student. > I would like to know few things, that does SQLite help me to learn and > devoid the space of not having any background. > >

[sqlite] beginner

2010-12-17 Thread Srinidhi Rao
Hello SQLiters... I am interested to learn the nuances of a SQL but I have no background of using one as I am an electronics student. I would like to know few things, that does SQLite help me to learn and devoid the space of not having any background. Can any one suggest me where (and how...) to

Re: [sqlite] beginner

2007-09-05 Thread Pavan
Also, just to add when you reply back with a different query to the list, pls post a seperate mail with a appropriate subject line so that more people might be interested to help you. Thanks, Pavan. On 9/5/07, Clay Dowling <[EMAIL PROTECTED]> wrote: > > Nishit, > > Much as we believe in

Re: [sqlite] beginner

2007-09-05 Thread Clay Dowling
Nishit, Much as we believe in helping out new people, I think it is reasonable to expect that before you ask for helping in using the C interface to SQLite that you familiarize yourself with C. Looping and logic structures are something you should learn pretty early on, and if you haven't

RE: [sqlite] beginner

2007-09-03 Thread kirrthana M
lite.org Subject: Re: [sqlite] beginner thanks for this help. i have done this... my another problem is that i have multiple columns in my database and on the basis of two columns( has integer values) i have to read the database. but i m unable to make a loop in C. can u help me. regards Nishi

Re: [sqlite] beginner

2007-09-03 Thread Pavan
prepare sql query and pass it to sqlite3_exec Thanks, Pavan. On 9/3/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > thanks for this help. i have done this... > my another problem is that i have multiple columns in my database and on > the > basis of > two columns( has integer values) i have to

Re: [sqlite] beginner

2007-09-03 Thread nishit sharma
thanks for this help. i have done this... my another problem is that i have multiple columns in my database and on the basis of two columns( has integer values) i have to read the database. but i m unable to make a loop in C. can u help me. regards Nishit On 9/3/07, Pavan <[EMAIL PROTECTED]>

Re: [sqlite] beginner

2007-09-03 Thread Pavan
You should link the library when you compile .It should be gcc test.c-l library name should be your sqlite shared library. Just check in /usr/lib directory Thanks, Pavan. On 8/31/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > hey buddy can u tell me how to compile the C source code in

Re: [sqlite] beginner

2007-09-03 Thread nishit sharma
can anybody tell me which database formats are supported by sqlite3 and the dependencies if i export my database to another system. regards Nishit On 8/31/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > hey buddy can u tell me how to compile the C source code in which i have > used >

Re: [sqlite] beginner

2007-08-31 Thread nishit sharma
hey buddy can u tell me how to compile the C source code in which i have used sqlite3_open() like calls. i m doing gcc test.c but it is giving me error of undefined reference. i think i am missing some thing in compiling. waiting for reply regards Nishit On 8/30/07, nishit sharma <[EMAIL

Re: [sqlite] beginner

2007-08-30 Thread nishit sharma
thanks for telling the link. regards On 8/30/07, Pavan <[EMAIL PROTECTED]> wrote: > > Hi Nishit, > > http://www.sqlite.org/quickstart.html > > This is a good link to start with. > > Thanks, > Pavan. > > > On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > > > Hi, > > i m beginner to

Re: [sqlite] beginner

2007-08-30 Thread Pavan
Hi Nishit, http://www.sqlite.org/quickstart.html This is a good link to start with. Thanks, Pavan. On 8/30/07, nishit sharma <[EMAIL PROTECTED]> wrote: > > Hi, > i m beginner to sqlite > can anybody send me a link which can help me > in building and maintining databse > --

[sqlite] beginner

2007-08-30 Thread nishit sharma
Hi, i m beginner to sqlite can anybody send me a link which can help me in building and maintining databse

Re: [sqlite] beginner: Is posible inside a result of a function call another function for delete or update the row??

2007-04-20 Thread David A O L
Use sqlite3_libversion(). See http://www.sqlite.org/capi3ref.html#sqlite3_libversion for details. Im using 3.3.13, I will like if you can show a little snipped of how to go with something like the next.. (The following at sqlite prompt) create table some(xthing varchar, count integer); insert

Re: [sqlite] beginner: Is posible inside a result of a function call another function for delete or update the row??

2007-04-20 Thread Dennis Cote
David A O L wrote: That mean Im using sqlite version 2?? (Because it say database locked). Like I know I have here sqlite3 I will search the way to print the version of the library used... David, Use sqlite3_libversion(). See http://www.sqlite.org/capi3ref.html#sqlite3_libversion for

Re: [sqlite] beginner: Is posible inside a result of a function call another function for delete or update the row??

2007-04-20 Thread David A O L
What I whant is that in // Here! I whant to update (increment, decrement, > etc). > > But it say that the DB is locked... With sqlite v2, yes. If you were using sqlite v3 you could do the UPDATE in the SELECT callback. That mean Im using sqlite version 2?? (Because it say database locked).

Re: [sqlite] beginner: Is posible inside a result of a functioncall another function for delete or update the row??

2007-04-20 Thread Michael Hooker
Michael Hooker From: "Dan Kennedy" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Friday, April 20, 2007 5:42 AM Subject: Re: [sqlite] beginner: Is posible inside a result of a functioncall another function for delete or update the row?? On Thu, 2007-04-19 at 13:29 -050

Re: [sqlite] beginner: Is posible inside a result of a function call another function for delete or update the row??

2007-04-19 Thread Dan Kennedy
On Thu, 2007-04-19 at 13:29 -0500, David A O L wrote: > I have a very basic sql statement, mainly Im printing it... > > static int GuardaActividadEnArchivo(void *arg1, int argc, char **argv, char > **azColName){ > int i; > char *nombre, *ok, *ko, *actividad; > nombre = ok = ko =

[sqlite] beginner: Is posible inside a result of a function call another function for delete or update the row??

2007-04-19 Thread David A O L
I have a very basic sql statement, mainly Im printing it... static int GuardaActividadEnArchivo(void *arg1, int argc, char **argv, char **azColName){ int i; char *nombre, *ok, *ko, *actividad; nombre = ok = ko = actividad = 0; for (i = 0; i < argc; i++) { printf("%s = %s ",

Re: [sqlite] beginner question

2006-11-17 Thread Qiang
--- Dennis Cote <[EMAIL PROTECTED]> wrote: > Qiang wrote: > > hello, > > > > two questions.. > > > > 1. comparing select one or two columns from one > row > > from a bigger table ( 20,000 - 30,000 rows, 20 > columns > > ). > >with > >select the same column from one row from a > smaller

Re: [sqlite] beginner question

2006-11-17 Thread Dennis Cote
Qiang wrote: hello, two questions.. 1. comparing select one or two columns from one row from a bigger table ( 20,000 - 30,000 rows, 20 columns ). with select the same column from one row from a smaller table (20,000 - 30,000 rows, 2 columns). does it make much different on

[sqlite] beginner question

2006-11-16 Thread Qiang
hello, two questions.. 1. comparing select one or two columns from one row from a bigger table ( 20,000 - 30,000 rows, 20 columns ). with select the same column from one row from a smaller table (20,000 - 30,000 rows, 2 columns). does it make much different on performance? if yes, what

Re: [sqlite] Beginner Problem...

2005-02-17 Thread Keith Herold
On Thu, 17 Feb 2005 16:34:07 +0100, Peter Berkenbosch <[EMAIL PROTECTED]> wrote: > Yes :) > > -Oorspronkelijk bericht- > Van: Claudio Bezerra Leopoldino [mailto:[EMAIL PROTECTED] > Verzonden: donderdag 17 februari 2005 16:25 > Aan: SQLiter Mailing List > O

RE: [sqlite] Beginner Problem...

2005-02-17 Thread Peter Berkenbosch
EG: % sqlite3 test.db < /data/temp/test.sql -Oorspronkelijk bericht- Van: Claudio Bezerra Leopoldino [mailto:[EMAIL PROTECTED] Verzonden: donderdag 17 februari 2005 16:25 Aan: SQLiter Mailing List Onderwerp: [sqlite] Beginner Problem... I've used SQLite utility to learn ab

RE: [sqlite] Beginner Problem...

2005-02-17 Thread Peter Berkenbosch
Yes :) -Oorspronkelijk bericht- Van: Claudio Bezerra Leopoldino [mailto:[EMAIL PROTECTED] Verzonden: donderdag 17 februari 2005 16:25 Aan: SQLiter Mailing List Onderwerp: [sqlite] Beginner Problem... I've used SQLite utility to learn about the library, but have a doubt... I need

[sqlite] Beginner Problem...

2005-02-17 Thread Claudio Bezerra Leopoldino
I've used SQLite utility to learn about the library, but have a doubt... I need to submit sql text scripts to the utility instead of command line sql code. It´s possible? Cláudio Leopoldino ___ Yahoo!