On 05/29/2015 03:27 PM, Zaumseil Ren? wrote:
>> On Fri, May 29, 2015 at 8:48 AM, Dan Kennedy <[hidden 
>> email]<http://sqlite.1065341.n5.nabble.com/user/SendEmail.jtp?type=node&node=82464&i=0>>
>>  wrote:
>>
>>> On 05/29/2015 12:59 PM, Zaumseil Ren? wrote:
>>>
>>>> On 05/27/2015 11:59 PM, Wade, William wrote:
>>>>
>>>>> But instead of using a regular SQL transaction to drop all the old
>>>>> tables, use the backup API to clobber the existing database with the new
>>>>> one.
>>>>>
> I have a database open, statements prepared and data inserted.
> Now I clobber these database using the backup API with a new empty one.
> The new database has the same structure (table,index).
> Can I use the already prepared statements?

If they were compiled with sqlite3_prepare_v2() they will still work. In 
this case SQLite will detect that your db schema has "changed" and 
automatically reprepare each statement object the first time 
sqlite3_step() is called.

If they were compiled with sqlite3_prepare() you will see SQLITE_SCHEMA 
errors.

Dan.







>
>
> Thank you,
> Rene
>
>
> Kernkraftwerk Goesgen-Daeniken AG
> CH-4658 Daeniken, Switzerland
>
> Diese Nachricht (inkl. Anhaenge) beinhaltet moeglicherweise vertrauliche oder 
> gesetzlich geschuetzte Daten oder Informationen. Zum Empfang derselben ist 
> (sind) ausschliesslich die genannte(n) Person(en) bestimmt. Falls Sie diese 
> Nachricht irrtuemlicherweise erreicht hat, sind Sie hoeflich gebeten, diese 
> unter Ausschluss jeder Reproduktion zu vernichten und den Absender umgehend 
> zu benachrichtigen. Besten Dank.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to