Re: [sqlite] problem with SQLITE_BUSY

2009-07-04 Thread freshie2004-sqlite
What about using only one connection and the ATTACH statement: http://www.sqlite.org/lang_attach.html Also, see the select-stmt form of the INSERT statement: http://www.sqlite.org/lang_insert.html Something like... sqlite3_open database B ATTACH DATABASE A.db AS dbA BEGIN INSERT INTO main.

[sqlite] sqlite-undo: loadable extension to give undo/redo functionality

2009-07-04 Thread freshie2004-sqlite
Hi All, As part of a project I am toying with writing I needed undo/redo functionality, so have ended up writing a loadable extension for sqlite which implements undo/redo functionality entirely within the database using custom functions. Kind-of a C implementation of http://www.sqlite.org/cvstrac

Re: [sqlite] How to do 5,000,000 "select"s as fast as possible

2009-07-03 Thread freshie2004-sqlite
Briefly... sqlite_prepare_v2(db, "select geneName,exonStart,exonEnd from refGene where chromo=? and txStart <=? and txEnd>=?" ... etc etc) start loop of 500 records Use bindings to assign the parameters. step through it Reset and clear bindings. end loop sqlite3_finalize

Re: [sqlite] first few characters of varchar() corrupted when SELECTing from a C++ program?

2009-06-29 Thread freshie2004-sqlite
(embarrassed) printf("testValue=(%s)\n", testValue); From: John Machin To: General Discussion of SQLite Database Sent: Tuesday, 30 June, 2009 4:51:09 PM Subject: Re: [sqlite] first few characters of varchar() corrupted when SELECTing from a C++ program? On

Re: [sqlite] Trigger execution sequence/order

2009-06-29 Thread freshie2004-sqlite
I should have looked harder... "The order of arbitrary." http://www.mail-archive.com/sqlite-users@sqlite.org/msg17641.html From: "freshie2004-sql...@yahoo.com.au" To: sqlite-users@sqlite.org Sent: Tuesday, 30 June, 2009 2:31:40 PM Subject: [sqlite] Trigger exe

Re: [sqlite] first few characters of varchar() corrupted when SELECTing from a C++ program?

2009-06-29 Thread freshie2004-sqlite
(Replying to pierr as I joined the list after uralmazamog sent original email) uralmazamog, The code is incomplete. You are not showing us how you are determining what testValue points to. What is returned if you use the following? sqlite3_open_v2( "testdat", &sqlDB, SQLITE_OPEN_READWRITE | S

[sqlite] Trigger execution sequence/order

2009-06-29 Thread freshie2004-sqlite
Hi All, I was wondering if there was a definite way of determining what sequence or order that triggers are executed in sqlite3. Have searched this list and the internet and the only thing I have found suggested that triggers are executed in alphabetical order, which is wrong. The following SQ