But I still get orignal error message, a pice of code as follow, suppose all routines open the same database: void fillSchedule(void *param) { Open(); ... Close(); } void fillCredits(void *param) { Open(); ... Close(); } int main(void) { Open() ... Close(); hThreadSchedule = CreateThread(..., fillSchedule, ...); hThreadCredits = CreateThread(..., fillCredits, ...); WaitForSingleObject(.., hThreadSchedule,...); WaitForSingleObject(.., hThreadCredits,...); } So does the through is right? ----- Original Message ----- From: "Dan Kennedy" <[EMAIL PROTECTED]> To: <sqlite-users@sqlite.org> Sent: Friday, January 19, 2007 1:08 PM Subject: Re: [sqlite] does sqlite support mutil-thread be run in samedatabase?
> > On Fri, 2007-01-19 at 11:42 +0800, LuYanJun wrote: >> The next question is that if I want to use multi-thread in sqlite, so >> I need to open same database for two times, right? > > Right. Each thread has to have it's own sqlite3* handle. > > >> ----- Original Message ----- >> From: "LuYanJun" <[EMAIL PROTECTED]> >> To: "sqlite-users sqlite.org" <sqlite-users@sqlite.org> >> Sent: Friday, January 19, 2007 10:53 AM >> Subject: [sqlite] does sqlite support mutil-thread be run in same database? >> >> >> > Hi guys >> > does sqlite support mutil-thread be run in same database? because of I >> > am stuck in such below sqlite error message: >> > error number = 21 >> > error message = library routine called out of sequence >> > certainly, I get some useful hints from stuff about interface of SQLite, >> > but I am not sure that weather sqlite support multi-thread. >> > Tks in advance. > > > ----------------------------------------------------------------------------- > To unsubscribe, send email to [EMAIL PROTECTED] > ----------------------------------------------------------------------------- > >