Drew Jensen wrote:

sub OpenQueryDataView( aQueryName as string, aConnection as variant )

   oDesktop = createUnoService("com.sun.star.frame.Desktop")
     Dim aURL as New com.sun.star.util.URL
   aURL.Complete = ".component:DB/DataSourceBrowser"
     oDispatchObject = oDesktop.queryDispatch(_
                       aURL, _
                       "_Blank",_
                       com.sun.star.frame.FrameSearchFlag.CREATE)
     Dim aProps(5) as New com.sun.star.beans.PropertyValue
   aProps(0).Name = "ActiveConnection"
   aProps(0).Value = aConnection
   aProps(1).Name = "CommandType"
   aProps(1).Value = com.sun.star.sdb.CommandType.QUERY
   aProps(2).Name = "Command"
   aProps(2).Value = aQueryName
   aProps(3).Name = "ShowMenu"
   aProps(3).Value = True
   aProps(4).Name = "ShowTreeView"
   aProps(4).Value = FALSE
   aProps(5).Name = "ShowTreeViewButton"
aProps(5).Value = FALSE oDispatchObject.dispatch(aURL, aProps)

End Sub


Well - as the old saying goes - Close but no cigar.

It appears to work - but can also get the OpenOffice process very confused...as in totally hung...what appears to be a deadlock condition - CPU time = 0 and non-responsive to any commands. All is fine if all you do is view the data ( or more accurately stay working within the new window ), but try to do something like Drag/Drop a few rows to a Calc sheet and Wham Bang - off to never never land.

But it is much too late for me now also - so till tomorrow then.



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

Reply via email to