Hi,

Wolfgang Schaible wrote:

hi,
Am Sonntag 30 Oktober 2005 02.57 schrieb Andrew Douglas Pitonyak:
I load a Base document.
I add a table using a macro (and the API).
The Base document shows the new tables.

If my macro uses SQL to create the table, then the tables are not
visible unless I close and re-open the document. Is there anyway
to tell OOo to refresh its view of things from a macro?
Don't know :-((    ->OOo 2.0 Base usable as office automation tool ?
To see the changes in the db app, you have to get the controller of the document and dispatch the command ".uno:DBRefreshTables". This will clear the tables page and refresh the tables the tables container if the connection.
Afterwards all tables should be correct.
The same happens when executing under the view menu "Refresh Tables". If this doesn't work please submit an issue for it. :-)

Same problem, if you -delete a lot of queries using a macro with SQL-statements. All queries are in reality deleted, but some of them are kept in the list.

-rename a table using a macro with SQL-statements and try to create a new, empty table with the same name. The application fails, because the test 'if(oConn.Tables.hasByName(sEOYY))then'
        print "Wrong: is executed after rename (before create)"
   endIf
fails in this case.

I think it's more then a missing refresh, Base seems to have among other bugs also the problem to synchronize processes.
Normally it should be enough to query for the XRefresh interface and call a refresh.


Wolfgang


PS
Can you delete a record using 'oRowSet.deleteRow()' without a crash?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Best regards,

Ocke

--
Ocke Janssen                      Tel: +49 40 23646 661, x66661
Dipl. Inf(FH)                     Fax: +49 40 23646 550
Sun Microsystems Inc.
Sachsenfeld 4                     mailto:[EMAIL PROTECTED]
D-20097 Hamburg                   http://www.sun.com/staroffice

Example isn't another way to teach, it is the only way to teach. Albert Einstein


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to