Re: [sqlite] expression syntax

2005-01-19 Thread ljucerk
Thanks Ulrik, It worked out with pre-compiled statements (using sqlite3_bind_int). But I still wonder if there is a way to set integer values (dynamic values) into DB with INSERT and UPDATE? NK > Hi NK, > > [EMAIL PROTECTED] wrote: > > >Hi, > >what is the correct syntax to use for WHERE

[sqlite] expression syntax

2005-01-18 Thread ljucerk
Hi, what is the correct syntax to use for WHERE expression: if (sqlite3_exec(test_db, "CREATE TABLE ana_db (item1 integer, item2 integer, item3 integer, item4 integer, item5 integer);", NULL, 0, NULL)) sqlite_error(test_db); // create index if (sqlite3_exec(test_db, "CREATE INDEX

Re: [sqlite] perfromance of UPDATE

2005-01-17 Thread ljucerk
no difference, even if each statement is enveloped with "BEGIN;" and "COMMIT;". According to SQLite speed comparison chart, UPDATE should be somewhat slower than INSERT, but not that much. I'm using in-memory database, no sync. Thanks, NK > On Mon, 17 Jan 2005 19:09:14 +, [EMAIL

[sqlite] perfromance of UPDATE

2005-01-17 Thread ljucerk
Hi, I'm using sqlite 3.0.8 on Linux, and the performance of UPDATE command seems to be slow. Here is the test program: error_code = sqlite3_open(":memory:", _db); if (error_code) { return (-1); } // set PRAGMAs if (sqlite3_exec(test_db, "PRAGMA synchronous=OFF;", NULL, 0,