Hi,
We r using Fedora Linux 10. Our application is, when any device is inserted, we will detect that create thread using pthread_create API. Which will find all MP3 files in the device and extract the metadata present in the mp3 files and fill a structre and send it to sqlite. Before that, I will create database like; int EDB_Init(void) { Printf("entered"); if(sqlite3_open(DATABASE,&db) == SQLITE_OK) { Printf("entetred 2\n"); if(sqlite3_exec(db,"create table File(Song_id int primary key, path varchar(100), FileType int)", NULL, 0, &GucpErrMsg) == SQLITE_OK) printf("entered 3"); { if(sqlite3_exec(db,"create table Metadata(Song_id int primary key, Album varchar(30), Artist varchar(30), Title varchar(30), Genre varchar(30), Time int, playlistName varchar(15))", NULL, 0, &GucpErrMsg) == SQLITE_OK) { sqlite3_close(db); return SUCCESS; } else { sqlite3_free(GucpErrMsg); sqlite3_close(db); return CREATE_METADATA_ERROR; } } else { Printf("printing 4"); sqlite3_free(GucpErrMsg); sqlite3_close(db); return CREATE_FILE_TABLE_ERROR; } } else { printf("NOT Opened DataBase\n"); return DATABASE_OPEN_ERROR; } } This will run in thread. But here, "entered" and "entered 2"is printing. But "entered 3" and "printing 4" both are not printing. After that, if I tried to query the database using command line tools, "Select * from File", it is giving error as "encrypted file or is not a database" Please help me. Thanks & Regards Pramoda.M.A CREST | KPIT Cummins Infosystems Limited | Bengaluru | Cell: +91 91640 57663 -----Original Message----- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of pierr Sent: Friday, July 10, 2009 11:59 AM To: sqlite-users@sqlite.org Subject: Re: [sqlite] SQLITE is not working in pthread Pramoda M. A wrote: > > Hi All > > Sqlite is not running in pthread. At first time, sqlite_open will > execute in pthread. From next time, no one API is executing. > Please guide me to make SQLite run in pthread. > Please anybody help me. > > Pramoda , Would you please provide some code snip so that we can know what exactly are you doing? -- View this message in context: http://www.nabble.com/SQLITE-is-not-working-in-pthread-tp24410382p24422426.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users