Re: Changes to DB are not persistent
[email protected] Wed, 22 Dec 2010 18:42:47 +0100
| Newsgroups | gmane.comp.openoffice.dba.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello Frank, Frank Schönheit schrieb: >> That's a good hint. I experimented with Connection.close(), but it >> didn't solve the problem. > > Hmm, I would have expected this to implicitly flush the changes. You're perfectly right. I just re-checked the code and I must have been making some mistake earlier this day. A single Connection.Close() flushes the changes and removes the lock. >> But freeing the DataSource with DataSource.Dispose() seems to work. > > Not a good idea, see below. That's true as well. DataSource.Dispose() doesn't seem to do any harm when I test the code with an old OOO 2.4 (as I did earlier) but crashes OOO 3.2.1 reproduceably. I'll review my code after Christmas and watch for the windows-problem, but I suspect some mistake with un-closed connections resulting in problems with locking (like a lock is held by an unclosed connection ...). Definitely my mistake and not an OOO-issue. Thank You very much for Your profound explanation. I'm rather new to OOO-coding, so your help is very welcome Bye, Daniel.