Hi Willem,

> then when i try to register the datasource it tells me i need to store 
> it first using the XStorable Interface. The problem is however taht i 
> cant get the XStorable interface from the datasource. It doesn't seem to 
> implement it! Also when i look at the defined intefaces in the 
> developers guide for the DatabaseContext and Datasource services 
> (13.2.2) and the UML on p.895 i don't see the XStorable interface as 
> implemented.

Is it really the exception message which tells the data source has an
XStorable? I know that the Dev Guide talks about this - unfortunately,
the guide is wrong (I plan to update it in this matter as soon as it's
finally Wiki-fied.).

Actually, there is a duality between a DataSource and a DatabaseDocument
- each data source has exactly one database document associated with it,
and vice versa. The XStorable interface exists at the document only,
*not* at the data source.

So, you need to
- query your data source for the XDocumentDataSource interface
- use the getDatabaseDocument method to retrieve the associated
  database document
- query the document for the XStorable interface

(side note: When you query the document for the XOfficeDatabaseDocument
interface, you can use its getDataSource method to retrieve the data
source - which is the same as the one with which you started.)

HTH

Ciao
Frank

-- 
- Frank Schönheit, Software Engineer         [EMAIL PROTECTED] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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

Reply via email to