Hi Fernand,

Fernand Vanrie schrieb:
Frank,

You made my day :-) it works like a charme

Sub Test1
        frame1 = thiscomponent.CurrentController.Frame

    Dim aProps(5) as New com.sun.star.beans.PropertyValue
    aProps(0).Name = "DataSourceName"
    aProps(0).Value = "Bibliography"
    aProps(1).Name = "CommandType"
    aProps(1).Value = 2  'SQL statement
    aProps(2).Name = "Command"
    aProps(2).Value = "SELECT * from biblio  WHERE Author like '%Sun%'"
    aProps(3).Name = "ShowTreeView"
    aProps(3).Value = false
    aProps(4).Name = "ShowTreeViewButton"
    aProps(4).Value = false
    aProps(5).Name = "ShowMenu"
    aProps(5).Value = true

frame2 = frame1.loadComponentFromURL(".component:DB/DataSourceBrowser", "_beamer", 0, aProps)
  End Sub

so I have my beamer with only the Author is "Sun"......

just for completness:

- " and ensure to also pass the FrameSearchFlag.CREATE flag, so the beamer is created when needed."
what you mean by that ??


flag = com.sun.star.frame.FrameSearchFlag.CREATE
frame2 = frame1.loadComponentFromURL(".component:DB/DataSourceBrowser", "_beamer",flag , aProps)

see http://api.openoffice.org/docs/common/ref/com/sun/star/frame/XComponentLoader.html

Regards
Peter


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

Reply via email to