Hi developers,
I would like to have your opinion on a code which was working with 1.9
and does not work in 2.0.1 and 2.0.2. Operating System is Win XP SP2 Home.
I can open a Base document, but it is impossible to close it by API :
com.sun.star.util.CloseVotoException
Dim monDbContext As Object, maSource As Object, dbDoc As Object
Dim adrOdb As String
Dim OdbOpt() as new com.sun.star.beans.PropertyValue
monDbContext = CreateUnoService("com.sun.star.sdb.DatabaseContext")
maSource = monDbContext.getByName("usine")
adrOdb = maSource.DatabaseDocument.URL
dbDoc = StarDesktop.loadComponentFromURL(adrOdb, "_blank", 0, OdbOpt())
msgbox("Look at the Base document !")
dbDoc.close(True)
The document usine.odb shows up, but the close instruction receives an
exception. If I suppress the last instruction, I can manually close the
document. Found with an integrated HSQL base and with dBase.
This is a problem if you want to open a report or a form and close it
later by API.
Bernard
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]