Re: [sqlite] SQLite4 (don't scream)

2012-06-28 Thread Stephan Beal
t size_t. There is of course one notable caveat: MSC does not support inttypes.h/stdint.h BUT there are free drop-in replacements available here: http://code.google.com/p/msinttypes/ -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal

Re: [sqlite] How to know the memory usage of an in-memory database.

2012-06-26 Thread Stephan Beal
-tool=callgrind --callgrind-out-file='callgrind.out' ./myapp and then feed callgrind.out to kcachegrind or similar to get enough detailed statistics to keep you busy for days. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal _

Re: [sqlite] C++ programming - int sqlite3_open_v2() question

2012-06-17 Thread Stephan Beal
On Sun, Jun 17, 2012 at 8:35 PM, Stephan Beal <sgb...@googlemail.com> wrote: > Pedantic note: cin.get() will wait for ENTER to be pressed before > returning, AFAIK. There is no portable way (in C/C++) to grab only the next > keystroke from the console. > But i was in d

Re: [sqlite] C++ programming - int sqlite3_open_v2() question

2012-06-17 Thread Stephan Beal
ER to be pressed before returning, AFAIK. There is no portable way (in C/C++) to grab only the next keystroke from the console. > Now, my next step is to create data tables, but that will be on another > email. > sqlite3_exec(), sqlite3_prepare(), sqlite3_bind_xxx(), sqlite3_step()

Re: [sqlite] How to run sql file in c++?

2012-06-17 Thread Stephan Beal
same way we described yesterday when you posted the exact same question. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] C++ programming - int sqlite3_open_v2() question

2012-06-17 Thread Stephan Beal
xtra argument (??1) where the db handle () goes. The final parameter should be NULL unless you specifically know otherwise (you would know if that were the case). -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal

Re: [sqlite] read sql file in c++

2012-06-16 Thread Stephan Beal
skipws; std::istream_iterator begin(is); std::istream_iterator end; std::copy( begin, end, std::ostream_iterator(os, "") now the contents are in os.str() resp. os.str().c_str(). -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___

Re: [sqlite] Announcement: DRH to be in Munich, Germany July 3rd, 2012

2012-06-15 Thread Stephan Beal
thing. The preferred activity at the moment seems to be a Fossil code sprint. On Tue, May 15, 2012 at 6:20 PM, Stephan Beal <sgb...@googlemail.com> wrote: > Hello, all, > > (i'm writing this post on behalf of/in conjunction with Richard, > cross-posting to the sqlite and Fo

Re: [sqlite] SQLite and C++

2012-06-13 Thread Stephan Beal
. The second is my current preferred API but it is driver-agnostic, not sqlite3-specific. The CPDO C++ API is trivially simple to use, though. Feel free to contact me off-list with questions. Happy Hacking! -- - stephan beal http://wanderinghorse.net/home/stephan/ http

Re: [sqlite] Announcement: DRH to be in Munich, Germany July 3rd, 2012

2012-05-30 Thread Stephan Beal
at 6:20 PM, Stephan Beal <sgb...@googlemail.com> wrote: > Hello, all, > > (i'm writing this post on behalf of/in conjunction with Richard, > cross-posting to the sqlite and Fossil mailing lists...) > > Management summary: DRH will be in Munich, Germany on July 3rd. Woul

Re: [sqlite] Fossil code sprint. Was: DRH to be in Munich, Germany July 3rd, 2012

2012-05-25 Thread Stephan Beal
her continents. > But those visiting this first time around will always be able to say, "we saw him before he was famous!" ;) Happy Hacking! -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users m

Re: [sqlite] Possible memory leaks on sqlite3_close

2012-05-24 Thread Stephan Beal
Hi! Did the call to sqlite3_close() _succeed_? It will fail (iirc) if any statements are still open. - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal On May 24, 2012 2:33 PM, "Alfred Sawaya" <alfred.saw...@nadratec.com> wrote: > Hello, >

Re: [sqlite] Feature Request: Change busy error message

2012-05-23 Thread Stephan Beal
the API docs already say). -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Feature Request: Change busy error message

2012-05-23 Thread Stephan Beal
ite3_unlock_notify(). #define SQLITE_BUSY 5 /* The database file is locked */ #define SQLITE_LOCKED 6 /* A table in the database is locked */ -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-

[sqlite] Announcement: DRH to be in Munich, Germany July 3rd, 2012

2012-05-15 Thread Stephan Beal
tabase. Perhaps you can recommend a good one? ;) [5] = again, my words, not his ;) -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Bug: Increment unique integer field

2012-05-07 Thread Stephan Beal
Keith, this type of detailed response is why i rate this list so highly above most others. These are the threads i learn the most from :-D. +1 Sorry for top-posting - writing on a phone. - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal On May 7, 2012 4:44 PM

Re: [sqlite] Fwd: Expression syntax

2012-04-30 Thread Stephan Beal
On Mon, Apr 30, 2012 at 7:40 PM, Stephan Beal <sgb...@googlemail.com> wrote: > "You cannot provide a table and column" > Ignore me, please - i'm confusing DB.TABLE with TABLE.COLUMN. Sorry about that. -- - stephan beal http://wanderinghorse.net/home/stephan/

Re: [sqlite] Fwd: Expression syntax

2012-04-30 Thread Stephan Beal
must be a single-column table. This final style is most frequently used with temporary tables. If you need to execute the same test multiple times, it can be more efficient to build a temporary table (for example, with CREATE TEMP TABLE...AS SELECT), and use it over and over,

Re: [sqlite] Fwd: Expression syntax

2012-04-30 Thread Stephan Beal
umn table. > That seems to conflict with the diagram, which clearly shows db.table as being an option: http://sqlite.org/syntaxdiagrams.html#expr about 80% of the way through that picture. Perhaps an improvement for the 3rd edition of the book (or for the syntax diagrams?). -- - stephan bea

Re: [sqlite] Using a select with 'where'

2012-04-27 Thread Stephan Beal
On Fri, Apr 27, 2012 at 10:00 PM, Tim Streater <t...@clothears.org.uk> wrote: > delete from addressbook where absid=(select personnick from grouplinks > where groupnick='27') > i think what you want is IN instead of =. -- ----- stephan beal http://wanderinghorse.net/hom

Re: [sqlite] Possible bug when rebuilding amalgamation without triggers or altertable

2012-04-27 Thread Stephan Beal
ght not work is all speculation about undefined behaviour. There is no "supported" solution, at least according to the docs. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-

Re: [sqlite] Possible bug when rebuilding amalgamation without triggers or altertable

2012-04-26 Thread Stephan Beal
spare time and > the fix is not too expensive for them. > The second "important note" does not appear to be specific to the amalgamation build. It appears to (in my interpretation) be making a blanket statement about those options. -- - stephan beal http://wanderinghorse

Re: [sqlite] Possible bug when rebuilding amalgamation without triggers or altertable

2012-04-26 Thread Stephan Beal
ese options may be removed from the code in future releases and without warning. For any particular release, some of these options may cause compile-time or run-time failures, particularly when used in combination with other options. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://

Re: [sqlite] Possible bug when rebuilding amalgamation without triggers or altertable

2012-04-25 Thread Stephan Beal
re-packaged C code files. SQLITE_OMIT_* compile-time options only work correctly when SQLite is built from canonical source files.* -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlit

Re: [sqlite] Permissions

2012-04-22 Thread Stephan Beal
Try the sticky bit: chown user:apache theDir chmod 4775 theDir :-? - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal On Apr 22, 2012 1:19 PM, "Steinar Midtskogen" <stei...@latinitas.org> wrote: > Patrik Nilsson <nipatriknils...@gmail.com&

Re: [sqlite] Using \"attach database\" to work around DB locking

2012-04-13 Thread Stephan Beal
bout that. You could use a > different thread of the same process, but of course "Threads are evil.". > In my experience every open() of :memory: is a difference instance? My hand is injured, making typing difficult, so i won't try it out right now :/. -- - stephan beal http://

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Stephan Beal
On Thu, Apr 12, 2012 at 6:07 PM, Sako Youssouf < youssouf.s...@renault-trucks.com> wrote: > # ar -rvs libsqlite3.a sqlite3.o > # gcc -L. -lsqlite -L/usr/lib/ -ldl -lpthread -o compil compil.c > You're back to the first problem you had: linking against /usr/lib/libsqlite.* -- ---

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Stephan Beal
On Thu, Apr 12, 2012 at 5:31 PM, Sako Youssouf < youssouf.s...@renault-trucks.com> wrote: > Others ideas? > Can you paste in the last thing (or two) you tried? You might also try passing -s to ar (it's equivalent to calling ranlib, from what i understand). -- ----- steph

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Stephan Beal
hat happens if you replace -l... -L... with sqlite3.o? -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Stephan Beal
On Thu, Apr 12, 2012 at 5:00 PM, Sako Youssouf < youssouf.s...@renault-trucks.com> wrote: > compil.c:(.text+0x6f): multiple definition of `main' > Remove shell.o from your libsqlite.a. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gpl

Re: [sqlite] SQLite Exception 14

2012-04-12 Thread Stephan Beal
IGGER14 /* Trigger NameTable Name */ #define SQLITE_TESTCTRL_RESERVE 14 sounds like the first one. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqli

Re: [sqlite] error compilation with Sqlite in C program

2012-04-12 Thread Stephan Beal
ing -L. to your compile command? -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] is it reliable to directly read sqlite3_sequence?

2012-04-08 Thread Stephan Beal
> at any point of time. In other words with this implementation your > function may return incorrect value. Thanks for that clarification. i incidentally removed it because it causes a huge number of malloc()s in my test app. -- - stephan beal http://wanderinghorse.net/home/stephan/ h

Re: [sqlite] is it reliable to directly read sqlite3_sequence?

2012-04-08 Thread Stephan Beal
ome time last year, and i've just always had it in the back of my mind (in the context of my db wrapper API). i appreciate the link to the docs - that certainly clarifies it for me (as a non-problem). -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal __

Re: [sqlite] In-memory and temporary database

2012-03-28 Thread Stephan Beal
? > On a full-blown machine you could use shared memory, probably. How about using your :memory: db as the main one and simultaneously queue the commits into an on-disk db which other apps would then read? (Or do they need to also update the db?) They would be a little bit behind the master, of co

Re: [sqlite] compressing BLOB

2012-03-02 Thread Stephan Beal
an implementation in the fossil source repo: http://fossil-scm.org/index.html/artifact/41357470cd8b147dcea8c684ed131ebf29643650?ln=53-105 -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing

Re: [sqlite] How to find number of tables

2012-02-25 Thread Stephan Beal
type='table'; type|name|tbl_name|rootpage|sql table|t1|t1|2|CREATE TABLE t1(a) table|t2|t2|3|CREATE TABLE t2(a) -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org ht

Re: [sqlite] Column names including spaces

2012-02-23 Thread Stephan Beal
On Wed, Feb 22, 2012 at 11:14 PM, Petite Abeille <petite.abei...@gmail.com>wrote: > http://www.sqlite.org/lang_keywords.html > @sqlite3 committers: there's a minor error on that page: is says "There are three ways of quoting..." and then goes on to show four ways. -- -

Re: [sqlite] Column names including spaces

2012-02-22 Thread Stephan Beal
SQL statements terminated with a ";" sqlite> create table t([Col 1]); sqlite> .h on sqlite> insert into t values('a'); sqlite> select * from t; Col 1 a sqlite> select [Col 1] from t; Col 1 a Hope that helps, -- - stepha

Re: [sqlite] make connection to another database within sqlite3 shell command

2012-02-17 Thread Stephan Beal
Or you can use the ATTACH command to connect multiple database files at once: http://www.sqlite.org/lang_attach.html -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.o

Re: [sqlite] Able to differentiate between No query and empty results?

2012-02-14 Thread Stephan Beal
(e.g. JavaScript engines traditionally don't) then using double is an option. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Incorporating user written functions into the sqlite library

2012-02-14 Thread Stephan Beal
ns the raw sqlite3 handle then you can use http://www.sqlite.org/capi3ref.html#sqlite3_create_function on that handle to register the functions (do this right after opening the db if at all possible). If it does not provide such a handle then you're out of luck :/. -- - stephan beal http://wande

Re: [sqlite] Able to differentiate between No query and empty results?

2012-02-14 Thread Stephan Beal
To expand on Simon's warning about types: any given column can contain different types in different rows in sqlite, so examining just the first row to get the types is not necessarily reliable (but may be for any given app, depending on how the app inserts/updates data). - stephan beal http

Re: [sqlite] Able to differentiate between No query and empty results?

2012-02-14 Thread Stephan Beal
Hi! Check the column count after sqlite3_prepare(). You don't need to execute the query to get the column count. - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal On Feb 14, 2012 5:50 PM, "Marc L. Allen" <mlal...@outsitenetworks.com> wrote

Re: [sqlite] A sqlite c++ wrapper, sqlite3x

2012-02-07 Thread Stephan Beal
. Feel free to contact me off-list with questions. - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal On Feb 7, 2012 7:53 AM, "Truls Haaland" <trul...@yahoo.com> wrote: > > Hello everyone,My project used sqlite3x, a sqlite c++ wrapper. No

Re: [sqlite] Segmentation fault on sqlite3_create_module

2012-02-03 Thread Stephan Beal
trictly legal in C++. >can see any more i think, that the program do no enter to any >method. And please show us what the DBG macro expands to - maybe the problem is in the first DBG() call? -- - stephan beal http://wanderinghorse.net/home/stephan

Re: [sqlite] Segmentation fault on sqlite3_create_module

2012-02-03 Thread Stephan Beal
On Fri, Feb 3, 2012 at 8:25 PM, Stephan Beal <sgb...@googlemail.com> wrote: > i take that back - if that were the case then the crash would almost > certainly happen later on (after your init routine returns). But it still > can't hurt to try. > But please try this:

Re: [sqlite] Segmentation fault on sqlite3_create_module

2012-02-03 Thread Stephan Beal
On Fri, Feb 3, 2012 at 8:22 PM, Stephan Beal <sgb...@googlemail.com> wrote: > sqlite3_declare_vtab()[1] does not document the lifetime requirements of > the string passed to it, and it's "conceivable" that the lifetime of the > table_structure string is the pro

Re: [sqlite] Segmentation fault on sqlite3_create_module

2012-02-03 Thread Stephan Beal
ust guessing here); std::cerr << "virtual_table_name="<http://www.sqlite.org/c3ref/declare_vtab.html -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http:

Re: [sqlite] Segmentation fault on sqlite3_create_module

2012-02-03 Thread Stephan Beal
> That's the reason for the crash but not the backtrace, so i can't say what let up to the crash, but the "Reason" part is telling - the address 03b8 is invalid. Are you sure you've properly initialized all of the memory/variables in initialize_niurouting()? -- - stephan beal http

Re: [sqlite] Segmentation fault on sqlite3_create_module

2012-02-03 Thread Stephan Beal
sqlite3 dbfile then run it as normal until it crashes, then type "bt" to get a backtrace. That will show what led up to the error. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing lis

Re: [sqlite] Segmentation fault on sqlite3_create_module

2012-02-03 Thread Stephan Beal
But finding out exactly where it fails requires either adding debug output to the plug or running it (in this case the sqlite shell) through a debugger. - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal On Feb 3, 2012 4:35 PM, "Jorge EliƩcer Osorio

Re: [sqlite] Segmentation fault on sqlite3_create_module

2012-02-03 Thread Stephan Beal
i dont know how it happend its my code: > > http://paste.ideaslabs.com/show/OPNHBY7xPG A segfault can be caused by at least 300 million different things. The easiest way to figure out where the problem is is to run your app through gdb (or equivalent) and get a backtrace after

Re: [sqlite] How to find type of value that a column contains.

2012-02-02 Thread Stephan Beal
Google for " sqlite3_column_type". ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal On Feb 2, 2012 8:22 AM, "bhaskarReddy" <uni...@gmail.com> wrote: > > Hi Friends, > > I have to find a type of a value in s

Re: [sqlite] File checking mechanism.

2012-02-01 Thread Stephan Beal
p://www.sqlite.org/capi3ref.html#sqlite3_open sqlite3_open_v2() has the ability to require that a DB exists before it is opened. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-use

Re: [sqlite] Found it

2012-01-26 Thread Stephan Beal
ohn Elrick's determination and stamina have been a treat to watch. IMO he should be made an honorary member of the dev team (or at least get a coffee mug). -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing

Re: [sqlite] sqlite3_bind_text destructor

2012-01-25 Thread Stephan Beal
; first place!! Lol! Fair enough. > http://www.adp-gmbh.ch/sqlite/**bind_insert.html<http://www.adp-gmbh.ch/sqlite/bind_insert.html> >> > Ha!! That example doesn't use the destructor arg. > It does, actually: it uses SQLITE_STATIC, which is a no-op function with the signatu

Re: [sqlite] sqlite3_bind_text destructor

2012-01-25 Thread Stephan Beal
nd_blob though it is admittedly somewhat confusing that one passes a (char const *) as opposed to (char *) even when expecting (depending on the value of the last parameter) it to be freed. Here's an example of its usage: http://www.adp-gmbh.ch/sqlite/bind_insert.html -- ----- st

Re: [sqlite] storing and comparing dates in sqlite

2012-01-23 Thread Stephan Beal
On Mon, Jan 23, 2012 at 7:01 PM, dotolee <woo_ju...@yahoo.com> wrote: > can you point me in the right direction? > aka. what data type am i using to store the date in my sqlite database? is > TEXT correct? > how do I do a select on it? > http://en.wikipedia.org/wiki/Unix_ti

Re: [sqlite] storing and comparing dates in sqlite

2012-01-23 Thread Stephan Beal
. IMO Unix timestamps are the most portable form out there. "Portable" meaning, in this context, the ability to work with them (more or less easily) in a wide variety of contexts. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal _

Re: [sqlite] sql/tcl script

2012-01-16 Thread Stephan Beal
wording implied the opposite). -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] sql/tcl script

2012-01-16 Thread Stephan Beal
On Mon, Jan 16, 2012 at 8:02 PM, Bill McCormick <wpmccorm...@gmail.com>wrote: > I assume that you are *NOT* naming the few that don't, rather these > scripting languages *DO* have sqlite3 binding support. Yes, sorry - a bad choice of wording on my part. :/ -- ----- steph

Re: [sqlite] sql/tcl script

2012-01-16 Thread Stephan Beal
JavaScript (v8 and SpiderMonkey engines) - Python ... -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Slow commits

2012-01-13 Thread Stephan Beal
le uploads in each transaction then of course it will be slow. You also haven't told us what type of storage you're using. Someone posted recently about a server process which writes to an SD card (which is bound to be somewhat slow). -- - stephan beal http://wanderinghorse.net/home/stephan/ http

Re: [sqlite] suppress "database is locked"?

2012-01-12 Thread Stephan Beal
other clients. i think what you want is load_extension: http://sqlite.org/lang_corefunc.html -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.o

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Stephan Beal
Try: # export LD_LIBRARY_PATH=/path/to/your/libs:$LD_LIBRARY_PATH # your commands here... (sorry, i'm on a mobile phone lying in bed or i'd be more specific/detailed!) - stephan beal http://wanderinghorse.net/home/stephan/ On Jan 5, 2012 12:07 AM, "Tilsley, Jerry M." <

Re: [sqlite] Performing Backup via TCL, receiving error

2012-01-04 Thread Stephan Beal
rmed on a build where that kludge was _not_ used. If the build linked to one copy of libtcl but is trying to use a different one at runtime, a segfault would almost certainly result. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___

Re: [sqlite] Restrict SQLite to Single user mode usage

2012-01-04 Thread Stephan Beal
ame user attaching to it multiple times concurrently. > . how can one achieve it like in sqlserver etc sqlite3 is not a client-server db, and is missing several features which you may be assuming it has. See: http://sqlite.org/whentouse.html -- - stephan beal http://wanderinghorse.net/home/ste

Re: [sqlite] (no subject)

2012-01-04 Thread Stephan Beal
ect your use of sqlite3 (unless of course you are on a very space-constrained device). -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi

Re: [sqlite] libtclsqlite3 package

2012-01-03 Thread Stephan Beal
4* -rw-r--r-- 1 root root 726308 Feb 25 2011 /usr/lib/libtcl8.4.so.0 As a quick workaround, you can simply create a symlink to it, e.g.: # sudo su - # cd /usr/lib # ln -s libtcl8.4.so libtcl8.4.12.so that is of course philosophically arguable, but it might get your build working. -- - st

Re: [sqlite] sqlite crash info

2012-01-02 Thread Stephan Beal
For example: echo "123" >> mydbfile that could effectively corrupt it even though it doesn't actually modify any bytes used by the db. (Whether or not that _does_ corrupt it depends largely on how sqlite3 tracks the logical end-of-file.

Re: [sqlite] PHP & SQLite examples

2011-11-14 Thread Stephan Beal
hich sqlite API you want to use. There are 2 or 3 active sqlite APIs for PHP (i personally prefer PDO but others on this list can/will likely recommend other APIs). -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list

Re: [sqlite] does sqlite3_reset have a performance impact onqueries?

2011-11-02 Thread Stephan Beal
On Wed, Nov 2, 2011 at 1:11 PM, Stephan Beal <sgb...@googlemail.com> wrote: > about undefined behaviour is true in that case, but i am 100% convinced > that i've seen that usage cause problems before. Perhaps it was the > compiler in question (one of the MSVC variants) which mad

Re: [sqlite] does sqlite3_reset have a performance impact onqueries?

2011-11-02 Thread Stephan Beal
standard. In any case (undefined or not), calling ostringstream::str() twice there is unnecessary, and downright inefficient if the user's STL does not use CoW (all of them do, AFAIK, but that's an implementation detail clients shouldn't count on). -- - stephan beal http://wanderinghors

Re: [sqlite] core dump happened in sqlite3_step for 30 statements in BEGIN TRANSACTION executing every 10 Millisecond

2011-11-02 Thread Stephan Beal
you can use std::ostringstream as a replacement for sprintf(): std::ostringstring q; q << "SELECT " << x << " ... "; dbStatements.push_back( q.str() ); -- - stephan beal http://wanderinghorse.net/home/stephan/ _

Re: [sqlite] does sqlite3_reset have a performance impact on queries?

2011-11-02 Thread Stephan Beal
() and s.size() instead of query.str().xxx(). -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Disk I/O Error

2011-11-01 Thread Stephan Beal
ago and someone (don't remember who) pointed out that platforms exist which can return >0 from read() when interrupted. My man page says: POSIX allows a read() that is interrupted after reading some data to return -1 (with errno set to EINTR) or to return the number of bytes already read. --

Re: [sqlite] Segmentation Fault on SQLITE3_exex

2011-10-28 Thread Stephan Beal
;; There's no reason why the overhead of sprintf() should be applied to a string which contains no formatting specifiers. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.or

Re: [sqlite] PHP + SQLite - Issues with update

2011-10-21 Thread Stephan Beal
On Fri, Oct 21, 2011 at 1:05 AM, Prashant Prabhudesai < prashantprabhude...@gmail.com> wrote: > $row = $res->fecth(); > ... After the script exits successfully I inspect the value in the Token column > Are you 100% sure the above command executes correctly? -- -

Re: [sqlite] How to make SQLite run safely on CIFS mounted file system?

2011-10-19 Thread Stephan Beal
when locking was enabled, even though it only made a few lock/unlock calls. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How to make SQLite run safely on CIFS mounted file system?

2011-10-19 Thread Stephan Beal
On Wed, Oct 19, 2011 at 9:23 PM, Stephan Beal <sgb...@googlemail.com> wrote: > race conditions, unclean network connection errors, blah blah blah. That > goes for all applications, not just databases. > > And not just for CIFS, but NFS and other networked filesystems as well.

Re: [sqlite] How to make SQLite run safely on CIFS mounted file system?

2011-10-19 Thread Stephan Beal
that file locking on networked filesystems has, historically speaking, always been problematic. Communicating the locks between separate machines, race conditions, unclean network connection errors, blah blah blah. That goes for all applications, not just databases. -- - stephan beal http://w

Re: [sqlite] How to make SQLite run safely on CIFS mounted file system?

2011-10-19 Thread Stephan Beal
On Tue, Oct 18, 2011 at 12:37 PM, Sune Ahlgren <sune_ahlg...@hotmail.com>wrote: > What can I do to make SQLite run safely on CIFS? > Nothing. Even MS Access cannot (or could not way back when i used it) be safely used on SMB/CIFS storage. -- ----- stephan beal http://wanderingho

Re: [sqlite] load database into memory java applet

2011-10-10 Thread Stephan Beal
t (whereas the version you post is providing the name "memory:", which is not correct). -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Error 14 - cannot open Database

2011-10-09 Thread Stephan Beal
is one. > Some things to try: Can you open the file with the command-line sqlite3 client? Is the file still there? Are the file permissions still correct (readable by your server's user id)? -- - stephan beal http://wanderinghorse.net/home/stephan/ __

Re: [sqlite] Statement failing

2011-10-09 Thread Stephan Beal
; to do just by reading the SQLite C documentation. > Amen. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Statement failing

2011-10-08 Thread Stephan Beal
here something I'm obviously doing > wrong? > http://www.php.net/manual/en/pdo.query.php says: Executes an SQL statement, returning a result set as a PDOStatement object "an" is singular, and result set implies a single statement. -- - stephan beal http

Re: [sqlite] Porting a simple logon script to SQLite3 from MySQL

2011-10-05 Thread Stephan Beal
l injection attack" and then read up on PDO::prepare() for how to avoid that problem: http://php.net/manual/en/pdo.prepare.php -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] How do you check if a sqlite database is open?

2011-10-04 Thread Stephan Beal
e if it's NULL (which you of course must initialize it to, or else it has an unspecified value). sqlite3 * db = NULL; int rc = sqlite3_open(, ); if(rc) { ... error ... ; sqlite3_close(db); } else { sqlite3 is open } After you close it, assign it to NULL again, and there's your "is ope

Re: [sqlite] feed "endless" data into sqlite, thru a shell script

2011-09-27 Thread Stephan Beal
a signal is caught or whatever. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Still chasing "database schema has changed"

2011-09-26 Thread Stephan Beal
a process is independent of each other. At least that was my experience when i tried it out a few years ago. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bi

Re: [sqlite] Problem with using WAL journal mode in embedded system (disk I/O error)

2011-09-26 Thread Stephan Beal
say "unlimited", is your db (or the amount of data being queried at one time) anywhere close to the size it gives out? From my (very limited) understanding of mmap(), it uses(?) the same address range as malloc() would [have if mmap() hadn't stolen it]. -- - stephan beal

Re: [sqlite] MC/DC coverage explained wrong in the home page?

2011-09-24 Thread Stephan Beal
se undefined behaviour, as described earlier). -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Newbie starting off question

2011-09-23 Thread Stephan Beal
brary from many apps. > A tiny expansion to that: someone recently reported a problem when serving a singleton db instance from a DLL (he was getting 2 different instances of the singleton, IIRC), but that's not an sqlite3-specific problem. -- - stephan beal http://wanderinghors

Re: [sqlite] Newbie starting off question

2011-09-22 Thread Stephan Beal
lgamation in my tree works around that. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Permissions issue with SQLite

2011-09-22 Thread Stephan Beal
On Thu, Sep 22, 2011 at 4:16 PM, Magnus Thor Torfason < zulutime@gmail.com> wrote: > SQLite version 3.3.6 > Just to preempt the inevitable request to try it on a current version: this is reproducible on 3.7.2 (Ubuntu 10.10). -- ----- stephan beal http://wanderinghorse.net/

Re: [sqlite] duplicate ( Corruption) in sqlite3 database

2011-09-22 Thread Stephan Beal
On Thu, Sep 22, 2011 at 2:04 PM, Jay A. Kreibich <j...@kreibi.ch> wrote: > The PK (first column). The CREATE TABLE showed it as an INTEGER > PRIMARY KEY Ah, indeed. i skipped that and looked at the unique index :/. -- ----- stephan beal http://wanderinghorse.net/

Re: [sqlite] duplicate ( Corruption) in sqlite3 database

2011-09-22 Thread Stephan Beal
any duplicates (all have a unique 3rd column value). ... > Here the dn name is unique but still i am seeing duplicate dn names. > Please show us the duplicates. i don't see any dupes in your inserts and you didn't present any SELECT data which shows duplicates. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] change after sqlite upgrade with python

2011-09-20 Thread Stephan Beal
te 3.7.7.1, the keys in each result row do > not include the table name in the key, but are solely the column name. Is > this expected? > Yes, it's expected and well documented. The names of ANY columns is UNSPECIFIED unless you use an AS qualifier to give them the names you want. -- -

Re: [sqlite] Disk I/O Error on Ext3/write-back/barrier FS.

2011-09-20 Thread Stephan Beal
do to work around it. Other database engines have also run into this same problem." But notice those last two sentences. -- - stephan beal http://wanderinghorse.net/home/stephan/ ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

<    1   2   3   4   5   6   7   >