Re: [sqlite] How to recover the SQLITE_CORRUPT error in C programming ?

2011-06-27 Thread Jan Hudec
On Mon, Jun 27, 2011 at 16:15:16 +0800, baiydavid wrote: > Thanks for you help. > > when an SQLITE_CORRUPT error is returned, we can use ".dump" command to > exports the data into a sql script, and then exec this sql in a new database, > But how to dump the data into a sql script with C

Re: [sqlite] How to recover the SQLITE_CORRUPT error in C programming ?

2011-06-27 Thread Michael Stephenson
Perhaps you could look at the code in shell.c and see how it does the .dump, then copy paste or something similar into your own app. I'm not sure if there might be issues with functions declared SQLITE_API vs SQLITE_INTERNAL, which may require some additional working around, but hopefully not.

Re: [sqlite] How to recover the SQLITE_CORRUPT error in C programming ?

2011-06-27 Thread Simon Slavin
On 27 Jun 2011, at 9:15am, baiydavid wrote: >when an SQLITE_CORRUPT error is returned, we can use ".dump" command to > exports the data into a sql script, and then exec this sql in a new database, >But how to dump the data into a sql script with C programming Interface? > Is there any

[sqlite] How to recover the SQLITE_CORRUPT error in C programming ?

2011-06-27 Thread baiydavid
Thanks for you help. when an SQLITE_CORRUPT error is returned, we can use ".dump" command to exports the data into a sql script, and then exec this sql in a new database, But how to dump the data into a sql script with C programming Interface? Is there any other better method to solve