Hello Matthias, >>Okay, then open the .odb file, and do View|Refresh Tables. > How can I script this from a Java or Basic program that knows only the > name under which the database is registered?
Pidgin-UNO-Java: oDS = css.sdb.DatabaseContext().XNameAccess.getByName( <url_or_name> ) oConn = oDS.XDataSource.connect( "", "" ) oTables = oConn.XTablesSupplier.getTables() oTables.XRefreshable.refresh() oConn.XCloseable.close() See below. > Well, if keeping the View->Data Sources window open counts as > "working with a DB", then it's not a leak. indeed > The problem is > that the program I'm writing needs to be able to reliably add new > CSV-files regardless of whether a user has the Data Sources view open > in some document or not. Hmm. As you can see in the above code fragment, the tables are a per-connection facet. That is, you can only refresh the tables for a given connection (in the code above, it's oConn, which is closed immediately afterwards, which probably renders this useless). If you need to refresh the tables collection of *all* connections which are opened somewhere in OOo .... Hmm. I can't think of any way to do this, sorry. There might be a somewhat cumbersome and pretty roundabout way if you want to refresh the data source browser's content (the DSB is the thing you get view "View->Data Sources"). I.e., if you know that the users are seeing the data source in a DSB, and you want to refresh this DSB, there might be a way. Not sure - but if you say this would be sufficient, we could try to find one together :) Ciao Frank -- - Frank Schönheit, Software Engineer [EMAIL PROTECTED] - - Sun Microsystems http://www.sun.com/staroffice - - OpenOffice.org Database http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]