Hello Frank,
Even your pidgin basic is more valuable than my compleet knowledge of this stuff, but i think i can do it working in the way you setout for me, i can already opening a Datasourcebrowser and filing it with data out of a datasource (your "oDataSourceBrowser") but how can i get acces to a DSB who is already manualy opened by a user.
I tryed this code after i maually loaded a datasourcebrowser with data in the beamer:
sub test Dim cntrlr As Object Dim frame1 As Object, frame2 As Object Dim url As new com.sun.star.util.URL Dim dispatcher As Object Dim oShape As Object, oDrawPage As Object, oModel As Object Dim oController As Object, oCtrll As Object Dim params(2) as new com.sun.star.beans.PropertyValue Dim list1 as object, ctrl as object dim oDoc as object dim oObj
oDoc = thiscomponent cntrlr = oDoc.getCurrentController() frame1 = StarDesktop.getCurrentFrame() url.Complete = ".component:DB/DataSourceBrowser" dispatcher = frame1.queryDispatch(url, "_beamer", 12) dispatcher.dispatch(url, DimArray()) frame2 = frame1.findFrame("_beamer", 4) frame2.setName("ODatasourceBrowser")
oObj = frame2.getController()
end sub
But running it the first time I end up with an EMPTY beamer and running it a second time i get an error dispatcher.dispatch(url, DimArray()) "object variable not set"
what are i am missing here ?
Thanks
Fernand
At 17:40 25/01/05, you wrote:
Hello Fernand,
> Need some information in basic code to get acces to multi selected lines > in the DataSourceBrowser.
out of my head, completely untested, and written in some pidgin basic:
oDataSourceBrowser ' the component in the small ' "data source browser" frame .getControls() ' all controls in the responsibility ' of this XFormController (0) ' the first control (which is a ' css.sdb.control.GridControl) .getSelection ' the current selection in this control
The selection should contain an array of integer values, denoting absolute positions within the com.sun.star.sdb.DataForm. To use those positions, do
oDataSourecBrowser ' as above .getModel() ' the form which is currently loaded ' into the DSB .createResultSet() ' a "clone" of the form, which can be ' operated without affecting the form ' itself .absolute( position ) ' move the result set to the given ' position, which is one of the integer ' values from the selection
Something like this :)
Ciao Frank
-- - Frank Schönheit, Software Engineer, OpenOffice.org Database Access - - [EMAIL PROTECTED] http://dba.openoffice.org - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]