[sqlite] Comments in VDBE program

2015-04-16 Thread Sairam Gaddam
Thanks! Comments are enabled now. On Thu, Apr 16, 2015 at 4:41 PM, Richard Hipp wrote: > On 4/16/15, Sairam Gaddam wrote: > > I am using C SQLite interface. How to enable comments in the VDBE program > > here? > > because they are not enabled by default. > > gcc -DSQLITE -DEBUG filename.c

[sqlite] Problems with pragma journal_mode

2015-04-16 Thread Simon Slavin
On 16 Apr 2015, at 2:33pm, Janke, Julian wrote: > rc = sqlite3_step(stmt); > --> returns SQLITE_DONE After the above two lines, print the value returned by sqlite3_column_text(stmt, 0) I'm not good at C off the top of my head but I think it's something like - const unsigned

[sqlite] Comments in VDBE program

2015-04-16 Thread Sairam Gaddam
I am using C SQLite interface. How to enable comments in the VDBE program here? because they are not enabled by default. gcc -DSQLITE -DEBUG filename.c ../sqlite3.c -ldl -lpthread I tried with the above line in the terminal but could not succeed in enabling the comments. Can any one help me with

[sqlite] Problems with pragma journal_mode

2015-04-16 Thread Janke, Julian
Ok, actually I'm a little bit confused, never used prepare(), step() and finalize() manually before. Maybe it's his absolute basics are missing me here, but maybe someone can still help me On which point I should get "wal" back? I changed my code to the following: rc = sqlite3_open(dbPath, );

[sqlite] Problems with pragma journal_mode

2015-04-16 Thread Simon Slavin
On 16 Apr 2015, at 10:10am, Janke, Julian wrote: > rc = sqlite3_open(dbPath, ); > rc = sqlite3_exec(db, "PRAGMA journal_mode=WAL;", testCallbackPrint, 0, > ); > [?] > sqlite3_close(db); Execute your PRAGMA as if it's a SELECT call (i.e. use sqlite3_prepare_v2(), sqlite3_step(), and

[sqlite] Request: Metadata about C API constants and functions

2015-04-16 Thread James K. Lowden
On Thu, 16 Apr 2015 00:40:28 +0100 Simon Slavin wrote: > > It is a very productive time when you > > get to delete code :-) > > "[If] we wish to count lines of code, we should not regard them as "lines

[sqlite] Problems with pragma journal_mode

2015-04-16 Thread Clemens Ladisch
Janke, Julian wrote: > PRAGMA journal_mode=WAL; > > Unfortunately, after these lines, the journal mode is not changed. > > -DSQLITE_OS_OTHER=1 Do you have mmap support? says: | WAL normally requires that the VFS support shared-memory primitives. | The built-in

[sqlite] Problems with pragma journal_mode

2015-04-16 Thread Dominique Devienne
On Thu, Apr 16, 2015 at 11:10 AM, Janke, Julian wrote: > I want to change the journal mode of a database to WAL. So I did the > following: > > rc = sqlite3_open(dbPath, ); > rc = sqlite3_exec(db, "PRAGMA journal_mode=WAL;", testCallbackPrint, 0, > ); > [?] > sqlite3_close(db); > > Unfortunately,

[sqlite] Hex literals not working?

2015-04-16 Thread Ketil Froyn
Thanks, I should have searched the changelog! On 16 April 2015 at 10:34, Zsb?n Ambrus wrote: > On Thu, Apr 16, 2015 at 10:29 AM, Ketil Froyn wrote: >> Hexadecimal integer literals follow the C-language notation of >> "0x" or "0X" followed >> by hexadecimal digits. For example, 0x1234

[sqlite] Hex literals not working?

2015-04-16 Thread Zsbán Ambrus
On Thu, Apr 16, 2015 at 10:29 AM, Ketil Froyn wrote: > Hexadecimal integer literals follow the C-language notation of > "0x" or "0X" followed > by hexadecimal digits. For example, 0x1234 means the same as 4660... > > Am I doing sometihng wrong? Or is this a feature that is newer than >

[sqlite] Hex literals not working?

2015-04-16 Thread Ketil Froyn
On https://sqlite.org/lang_expr.html under "Literal Values (Constants)", I read: Hexadecimal integer literals follow the C-language notation of "0x" or "0X" followed by hexadecimal digits. For example, 0x1234 means the same as 4660... However, this doesn't seem to work for me: sqlite>

[sqlite] Problems with pragma journal_mode

2015-04-16 Thread Simon Davies
On 16 April 2015 at 10:10, Janke, Julian wrote: > Hi everyone, > > I'm relatively new to SQLite and currently I'm experimenting a little bit > with the SQLite database on an embedded system. > I want to change the journal mode of a database to WAL. So I did the > following: > > rc =

[sqlite] lemon problem with two versions of lempar.c

2015-04-16 Thread Neo Anderson
I am utilizing lemon in one of my Apple Store Apps. My parser works fine with the 'old' lempar.c found in source tree TRUNK/tool/.I also found a newer version in TRUNK/src, but when I compile myparser.c generated using this lempar.c, I got compilation errors:test.c:376:7: error: use of

[sqlite] Problems with pragma journal_mode

2015-04-16 Thread Janke, Julian
No there are no mmap support in the vfs. So I need also -DSQLITE_DEFAULT_LOCKING_MODE=1 in my compile time options, right? Recompile and retested it, but still the same behavior (also on an empty new db). I am surprised that sqlite3_exec(db, "PRAGMA journal_mode;", testCallbackPrint, 0, );

[sqlite] Problems with pragma journal_mode

2015-04-16 Thread Janke, Julian
I use the version SQLITE_VERSION "3.8.8.3" -Original Message- From: sqlite-users-bounces at mailinglists.sqlite.org [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Simon Davies Sent: Donnerstag, 16. April 2015 11:20 To: General Discussion of SQLite Database Subject:

[sqlite] Problems with pragma journal_mode

2015-04-16 Thread Janke, Julian
Hi everyone, I'm relatively new to SQLite and currently I'm experimenting a little bit with the SQLite database on an embedded system. I want to change the journal mode of a database to WAL. So I did the following: rc = sqlite3_open(dbPath, ); rc = sqlite3_exec(db, "PRAGMA journal_mode=WAL;",

[sqlite] Comments in VDBE program

2015-04-16 Thread Richard Hipp
On 4/16/15, Sairam Gaddam wrote: > I am using C SQLite interface. How to enable comments in the VDBE program > here? > because they are not enabled by default. > gcc -DSQLITE -DEBUG filename.c ../sqlite3.c -ldl -lpthread > I tried with the above line in the terminal but could not succeed in >

[sqlite] Request: Metadata about C API constants and functions

2015-04-16 Thread Simon Slavin
On 2015-04-10 04:11 PM, Richard Hipp wrote: > https://www.sqlite.org/toc.db I download this and do the following: 164:~ simon$ sqlite3 /Users/simon/Desktop/toc.db SQLite version 3.8.5 2014-08-15 22:37:57 Enter ".help" for usage hints. sqlite> .mode column sqlite> select * from toc limit 10;

[sqlite] Request: Metadata about C API constants and functions

2015-04-16 Thread Simon Slavin
On 16 Apr 2015, at 12:31am, Roger Binns wrote: > It is a very productive time when you > get to delete code :-) See the paragraph "How do you measure programmer productivity?" half way down the page, just before the