Hi Fernand,
> Frank S. adviced me to use XDatabaseDocumentUI.loadComponent, instead of 
> loadComponentFromURL with the particular advantage that 
> loadComponentFromURL, does not require the active connection, but 
> calculates it itself. so i tryed this code:
> 
>   oDB = stardesktop.loadComponentFromURL( getDatabaseDocument("DBName").URL, 
> "_Blank", 0, array() ) 
> REM "getDatabaseDocument" are a serie of Functions I picked from Drew Jenssen 
>  wait 1000
> REM here i have a normal opened DBdocument
>   oForm = 
> oDB.CurrentController.loadComponent(com.sun.star.sdb.application.DatabaseObject.FORM,"FormName",FALSE)
>  
> REM here i run in a Execption telling that "No connection to the Database 
> exist" 

XDatabaseDocumentUI also has a method "connect" :)

So your question suggests the connection should be done automatically in
the loadComponent implementation ... Hmm. Have to think about this.

Ciao
Frank


-- 
- Frank Schönheit, Software Engineer         frank.schoenh...@sun.com -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@api.openoffice.org
For additional commands, e-mail: dev-h...@api.openoffice.org

Reply via email to