Thanks Dennis Cote. Now even though synchrounous is set to FULL. But Database Corrouption is happening. Here are my observations in our sqlite 2.8.13.
1. This corrouption is not detected by the sqlite_open(). 2. After the crash/power failure. I see a journal file in the same directory as the database file. This means the database can be rolled back. I analyed the journal header and checksum, it looks fine. 3. Now before the rollback if i copy the database file to a different directory and open using sqlite. None of the tables are seen. 4. Now if i do a sqlite_open(), the rollback of the orginal data does not happen. But the journal file is removed. I am suprised how can journal be be present and still database corruption happen.. Please help me resolving this issue. Bye Jayanth On Mon, 23 Oct 2006 Dennis Cote wrote : >jayanth KP wrote: >> But how do we read the current synchronous value using C interface. Plz >> reply. >> >> >Jayanth, > >Try this: > > sqlite3_stmt* s; > sqlite3_prepare(db, "PRAGMA SYNCHRONOUS", -1, &s, NULL); > sqlite3_step(s); > int sync = sqlite3_column_int(s, 1); > sqlite3_finalize(s); > > switch (sync) { > case 0: // off > case 1: // normal > case 2: // full > } > > >It simply executes the PRAGMA and collects the result. > >HTH >Dennis Cote > >----------------------------------------------------------------------------- >To unsubscribe, send email to [EMAIL PROTECTED] >----------------------------------------------------------------------------- >