Hi Drew,

> I am hoping someone can help with this.
> 
> Need to open a ( execute ) a query from a Basic script.
> 
> Not sure if I am on the right track -
> 
> aconnection.queries.getByName( <queryName >)
> 
> That gets me the query definition and this has the function execute so
> 
> aconnection.queries.getByName( <queryName >).execute( <parameters>)
> 
> 1 ) Am I going about this correctly?
> 2) If so could really use some help on setting up the paramters for the 
> execute function.

Seems you guys already found your way around while I was sitting on a
LAN party during the weekend - I should do this more often :)

Nonetheless, some general remarks:

Not sure how the work flow looks, but you might consider opening the
query in the "beamer window" (a historical name) - the small window at
the top of a frame, which is used e.g. for the "normal" data source
browser. This might give a better user experience in your application.
For doing this, you would need to use XDispatch/Provider (didn't I just
recommend using XComponentLoader?). Alternatively, use the XFrames
(IIRC) method findFrame, with a name of "_beamer" and a
FrameSearchFlag.CREATE. Then, use the XComponentLoader of the found frame.

For completeness, let me mention that an interface to "simulate" opening
a table/query/form/report from the application window - i.e.
programmatic access to what happens when you double-click such an
object, or choose "Edit" in its context menu -, is planned. This would
not have helped you here, since you don't have an database application
window, though ...

Ciao
Frank


-- 
- Frank Schönheit, Software Engineer         [EMAIL PROTECTED] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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

Reply via email to