Hi Drew,
> NOTE - If you try to open the Basic IDE here you will not see the ODB
> file (MyInvoice_pre_2) when you do this - WHY - because the odb file is
> currently hidden. The Basic IDE UI honors this - I like that, but don't
> know if it was intentional or not, I tend to think it was.
It is. Hidden documents can occur in quite some other scenarios, too.
For instance, if you have an .odb accessing a spreadsheet, this one is
loaded hidden, too. The other applications also have situations where
they load a "secondary" document hidden. You definitely do not want to
expose all those in the Basic IDE.
> -so-
>
> Use File>Open to bring the database document onto the desktop.
>
> In the database document window click on the Tables section.
>
> Now go back to the frmInventoryList and click on the 'New' button.
>
> The form frmInventoryItem opens this time.
>
> Why?
>
> 1 ) this is the only place (currently) where I use:
> thisDatabaseDocument.FormDocuments.getByName("frmInventoryItem").Open
>
> 2) Calling Open with no parameters works ONLY after a connection has
> been created USING the database document UI. The fact that within the
> macros I have already used:
> thisDatabaseDocument.DataSource.getConnection("","") a number of times
> is not enough.
To the data source, your basic macro is an arbitrary client, requesting
a connection. The doc UI (the controller), does not know anything about
this. Instead, it needs to create an own connection.
See my previous mail for how to obtain connections (and opening forms)
via the controller, this should solve the problem.
> This may be significant as a clue to another issue. How to get rid of
> the connections so that the file FULLy closes.
Same solution - obtain the connection from the controller, it then stays
in the controller's responsibility, instead of your own.
> With the macros in the ODB file as it stands you can not open this file
> twice in the same OO.o session and have the function Init:onLoad called
> after the first time. It appears that this is because a connection(s) to
> the HSQLdb engine is never released.
Did not check your macros, but I suppose you did not do a "dispose" on
the connection you got from the data source?
Ciao
Frank
PS: quite cool document ...
--
- Frank Schönheit, Software Engineer [email protected] -
- Sun Microsystems http://www.sun.com/staroffice -
- OpenOffice.org Base http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]