I am displaying a data table in Base as follows:
Code: Select all
Sub datentabelle_anzeigen()
Dim URL as New com.sun.star.util.URL
Dim Args(5) as New com.sun.star.beans.PropertyValue
Dim Dispatch As Object
DatabaseContext1 = createUnoService("com.sun.star.sdb.DatabaseContext")
Datenquelle1=DatabaseContext1.getByName(ThisDatabaseDocument.URL)
Verbindung = Datenquelle1.GetConnection("","")
sql="Select * FROM ""SampleTable"""
URL.Complete = ".component:DB/DataSourceBrowser"
Dispatch = StarDesktop.queryDispatch(URL,"_Blank",8)
Args(0).Name = "ActiveConnection"
Args(0).Value = Verbindung
Args(1).Name = "CommandType"
Args(1).Value = 2
Args(2).Name = "Command"
Args(2).Value = sql
Args(3).Name = "ShowMenu"
Args(3).Value = True
Args(4).Name = "ShowTreeView"
Args(4).Value = False
Args(5).Name = "ShowTreeViewButton"
Args(5).Value = False
Dispatch.dispatch(URL, Args)
End Sub
How can I, by means of macro, access these selection?
At least I want to determine the index of the data row in which the cursor (or the selection) is currently located.
greetings,
joesch