For opening a DataSourceBrowser I use following code

     Dim aProps(6) as New com.sun.star.beans.PropertyValue
     aProps(0).Name = "DataSourceName"
     aProps(0).Value = "mysql_native"
     aProps(1).Name = "CommandType"
     aProps(1).Value = 2 ' 0 = tabel , 1 = query , 2 = SQL statement
     aProps(2).Name = "Command"
     aProps(2).Value = "SQL statement"
    aProps(3).Name = "ShowTreeView"
     aProps(3).Value = false
     aProps(4).Name = "ShowTreeViewButton"
     aProps(4).Value = false
     aProps(5).Name = "ShowMenu"
     aProps(5).Value = true
     aProps(6).Name = "EscapeProcessing"
     aProps(6).Value = false
oDataSourcebrowser = frame1.loadComponentFromURL(".component:DB/DataSourceBrowser", "_beamer", 0, aProps)

That works fine excepted that the user is asked for a "Username" and "Password" when the datasource is opened !

How can i avoid this behaviour by passing the "username and "password" within my code ? I tryed to use a "ActiveConnection" where the Username and password are passed... no luck
Neither "UserName" or "Password" are accepted as arguments ....

Only when de datasource is open (even hidden) on the desktop the "UserName" and "Password are no longer asked.

thanks for any hint

Fernand

Reply via email to