Le samedi 10 décembre 2005 à 12:35 +0100, Jovial a écrit : J'ai cherché un peu et voici ce que j'ai trouvé. Il s'agit d'un échange entre Andrew Pitonyak et Frank Schoenheit :
Hi Andrew, > 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()) Yes, exactly this caused an ownership problem: Nobody ever closed the DatabaseDocument, this the underlaying file kept locked. > I even tried adding: > oDB.DatabaseDocument.close(true) As said, I think this is only part of 2.0.1 and not yet available in 2.0. Possibly oDB.DatabaseDocument.dispose might help in 2.0 - though this is dangerous, since all other clients of this document (e.g. if it's currently loaded in some frame) might be affected, too. > and that did not help. Should I open a case for this with a simple macro > that essentially performs the steps shown above? You might. I suppose I will close it as "does happen in 2.0, but not in 680m137 anymore" :), but we might want to be on the safe side. Ciao Frank Donc, il faut réessayer avec une version 2.0.1 et avec soit oDB.DatabaseDocument.close(true) et charger le doc ODB dans une fenêtre masquée au lieu de l'obtenir depuis son contexte : 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. Citation Frank Schoenheit Alex --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
