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 ?
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 can, however, use the API to delete tables and the changes are
reflected immediately. I can not remember off hand how to query the
tables and their structures using HSQLDB... From what I can see, it
looks like if I intend to delete tables and such using the API, then I
am fine. If I intend to use the SQL to delete tables, then I should
probably use SQL to see if the tables exist (ie, how to use SQL to check
the schema, I have done this using Oracle and MySQL, but not HSQLDB;
yet). My next test will be to use the SQL to add/remove the table, close
the base document, reopen the base document, and then check the API to
see if things are as they should be. Actually, I can just look at the
Base document using the GUI to see.
I think it's more then a missing refresh, Base seems to have among
other bugs also the problem to synchronize processes.
My expectation is that a Base document holds this information in memory
and does not recheck every time.
Wolfgang
PS
Can you delete a record using 'oRowSet.deleteRow()' without a crash?
I have not yet tried this. I will see if I can try this after church
today. I need to leave shortly.
--
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]