Am 09.09.2008 um 20:46 schrieb Dennis Cote:

> Lothar Behrens wrote:
>>
>> 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.
>>
>
> The fact that a journal file exists at this point implies that you are
> still in a transaction. If you close the database without committing
> this transaction, the changes that you can see in your application  
> will
> be rolled back and lost (see H12019 at
> http://www.sqlite.org/c3ref/close.html).
>
> Can you add a function to check the auto commit status in your main  
> line
> code (i.e. where you are navigating and viewing the data)?
>

Hmm,

I can add such a function beside the others to update my status line  
for sample.

But I don't believe, that I do start any transaction. This is because  
if I simply open
only this database form that makes these problems all additions will  
be stored and if
I restart my application the data is still there as inserted.

I only start a transaction, when I create tables, because I rewrite  
some statements.
But this only happens, when the database is freshly created. Also the  
code is tested
and the transaction is committed, otherwise the shema wouldn't exist  
after a restart.

But when you say, that, if jornal files are open, transactions are  
opened, I would set a
breakpoint at the line of code the transaction opens these jornal file  
and I could look
arount there from who the transaction comes.

Is that an option ?

What function in the sqlite library does this ?

Lothar

> Dennis Cote
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>

-- | Rapid Prototyping | XSLT Codegeneration | http://www.lollisoft.de
Lothar Behrens
Heinrich-Scheufelen-Platz 2
73252 Lenningen








_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to