Am 09.09.2008 um 17:20 schrieb Dennis Cote:
> Jay A. Kreibich wrote:
>>
>> Everything you describe sounds exactly as if a transaction has been
>> started, but is not committed. When you close the database, the
>> transaction is automatically (and correctly) rolled back. This will
>> also delete the journal file.
>>
>> I know you said you weren't trying to start a transaction, but you
>> might double check that. Set a breakpoint right after the INSERT is
>> finished and check to see if you have a journal file or not. You
>> could also try issuing a "BEGIN" right after the INSERT. If you get
>> an error, you're already inside a transaction.
>>
>
> An easier and more accurate way to check may be to add a call to
> sqlite3_get_autocommit() after your insert is complete. It will return
> zero if there is an active transaction, and 1 if there is not (i.e. it
> it in autocommit mode).
>
Ok,
I have added this function right after sqlite3_step, that does the
prepared insert statement.
int nReturn = sqlite3_step((sqlite3_stmt*)(*start));
int autocommit = sqlite3_get_autocommit(m_pDatabase);
if (autocommit == 0) {
wxLogError(_("Warning: Database is not in autocommit mode.\n"));
}
autocommit is always 1. Also I have thested the following:
Open the application and opening the form to display first row -> no
jornal file is opened, because no write is yet done.
Adding some rows and navigating forward and backbackward -> jornal
file is opened and I can see my data in the application.
Now I will try to use pragma database_list; but I need to restart my
box.
So I will mail the result later :-(
Lothar
-- | Rapid Prototyping | XSLT Codegeneration | http://www.lollisoft.de
Lothar Behrens
Heinrich-Scheufelen-Platz 2
73252 Lenningen
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users