Frank Schönheit - Sun Microsystems Germany wrote:

Hi Andrew,

I will perform some more complete checks and come up with a minimal set of steps to reproduce the problem. I am using macros, which means that I am using a database context to get the database. I then obtain a connection. I close the connection, but I do not dispose the retreived database. I think that I did that in a prerelease version and then I could no longer obtain the database without restarting OOo :-) I will verify the details, I need to go somewhere else to have access to a Windows computer for testing.

Try "close( true )" on the database document. See the XCloseable
documentation at the OfficeDatabaseDocument service (in the IDL
reference in a recent SDK).

And yes, this interface at this service is relatively new, exactly
because there *was* a problem with undefined ownerships of database
documents opening via API and/or UI.

Hmm, now that I think about it ... the addition of the XCloseable might
not have made it into 2.0, but only 2.0.1. The long delay between fixing
an issue and seeing it in a final build is ... disturbing sometimes.

In any case, exactly the not-disposing in your macro could be the
problem. Try loading the document into a hidden frame instead of
obtaining it from the context, and then closing this frame. This should
get rid of the ownership problems. In 2.0.1, you should use "close( true
)" then.
Something simple like this causes a problem:

   oDBContext = createUnoService( "com.sun.star.sdb.DatabaseContext" )
   oDB = oDBContext.createInstance()
   oDB.URL = "sdbc:embedded:hsqldb"
   oDB.DatabaseDocument.storeAsURL(dbURL, Array())

I even tried adding:
   oDB.DatabaseDocument.close(true)

and that did not help. Should I open a case for this with a simple macro that essentially performs the steps shown above?

--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw
My Book: http://www.hentzenwerke.com/catalog/oome.htm
Info:  http://www.pitonyak.org/oo.php
See Also: http://documentation.openoffice.org/HOW_TO/index.html


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to