Il 12/05/2011 00:32, Ariel Constenla-Haile ha scritto:
Hello Paolo,

On Wednesday 11 May 2011, 13:33, Paolo Mantovani wrote:

I need to change (via API) the database bound to a given document.

In practice I need to perform via API the same operation that you
normally do via the menu Modify->Change Database.

In Writer I see Edit - Exchange Database

Yes, sorry for my heuristic translation from the Italian;)

the above shows you are missing (b), it is not enough to change the, you have to instantiate the field masters,
and modify the existing fields.
Note that SwDoc::ChangeDBFields does a few things more:
it updates the text section's condition (a text section may bi hidden
according to a db related condition like Datasource.Table.Field EQ Something
so you have to change Dataource.Table to newdatasource.newtable in your
it updates *not only* database fields, but also other text fields, see the
switch in

I've studied your reply with great attention and interest.
Thank you very much for the very valuable information and for the solution that you suggested. Unfortunately it seems much more complicated than I could imagine, and currently I'm a bit rusty, but I will give it a try.

Thanks again
Paolo Mantovani
To unsubscribe send email to
For additional commands send email to
with Subject: help

Reply via email to