Frank Schönheit - Sun Microsystems Germany wrote:
Hi Wolfgang,
Sounds good, but
running a macro (with Base-Doc not open), how can I obtain
<a controller of the document and dispatch the command
".uno:DBRefreshTables"> ?
Ocke's last sentence
Normally it should be enough to query for the XRefresh
interface and call a refresh.
was referring to the tables container of your connection object, and I
think this is what caused Andrew's ecstasy :)
I tried
oTables = oCon.getTables()
oTables.refresh()
This did not work....
Ocke's first solution about dispatching an Command to the controller
only updates the view in this controller. This internally *also*
refreshes the tables container of the connection of the controller, but
since your macro most probably has a connection different from the one
used in the controller, this isn't of much help for *your* connection.
If the document is NOT open, then it is probably not a problem if I am
then finished with my commands :-)
I have a routine that searches all open components for a document with a
certain URL. I use this routine and then I issue the dispatch. The
bottom line is that I now have a work-around for the problem.... I
actually have a bunch of really cool routines that I will make available
as soon as I can get them reformatted.
--
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]