[sqlite] multi_thread for writing

2005-04-16 Thread RexChan\(TP/HK\)
Hi all, I meet the problem of multi_thread writing in version 3.2.1. First I create two threads A and B and each thread has its own db structure. each thread uses the following SQL commands to do the insert action. BEGIN; . insert record 200 times . . END; Thread A does the insert first an

Re: [sqlite] multi_thread for writing

2005-04-16 Thread Kervin L. Pierre
As far as I know, SQLite does not support multiple simultaneous writers. I believe you need to be ready to handle SQLITE_BUSY and SQLITE_SCHEMA errors on every call in a multi- threaded application. SQLITE_BUSY... http://www.sqlite.org/cvstrac/wiki?p=MultiThreading SQLITE_SCHEMA... http://www.s

[sqlite] Create Table Programatically

2005-04-16 Thread Kiel W.
I've been trying to create a table programatically though C++ without luck. Here is what I have: /* * The function that acts as a wrapper around sqlite3_exec */ inline int SqliteGatekeeper::ExecuteSql( const string sql, sqlite3_callback CallBack = 0, void* callbackParam = 0) { int rc = s

Re: [sqlite] Create Table Programatically

2005-04-16 Thread Dan Kennedy
It means there is a problem with the 'database' handle. Some likely causes are: * You never opened the database, * You've already called sqlite3_close() on the handle, * Another thread is using the handle (threads - just say no), or * Some other part of your program has accidentally overwritten

Re: [sqlite] api questions about data lifetimes

2005-04-16 Thread Austin Gilbert
On Apr 15, 2005, at 7:03 PM, Brian Swetland wrote: [Austin Gilbert <[EMAIL PROTECTED]>] Not to discourage you from rolling your own, but what about CppSQLite?? www.codeproject.com/database/CppSQLite.asp Well, it seems a little windows-centric It looks windows-centric at a glance due to the demo co