Re: Changes to DB are not persistent

Bernard Marcelly <[email protected]> Tue, 21 Dec 2010 15:25:39 +0100
Newsgroups gmane.comp.openoffice.devel.api
Message-ID <[email protected]>
Hello,
Message de [email protected]  date 2010-12-21 13:16 :
>
> The code is adding a row to a database (Base-Document with embedded
> HSQL-DB) every time it gets called. However the changes are lost after
> closing OOO. To make them permanent it's necessary to flush() the
> DataSource.
>
> First question: This is not exspected bahaviour, is it? Changes should
> be persistently saved without calling flush(), or am I wrong?
>
I don't see in your code a correct closure of the connection.

Connection.close
Connection.dispose

In my experience, flush is not necessary.

Regards
   Bernard