Drew Jensen escribió:
Hi,

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.

Thanks in advance

Drew

Hi Drew,

if I understood you, you are trying to open the UI for "seeing" a query,
just as if you double-clicked on a query name on the main application
window, am I wrong?

Here I correct myself:

If yes, you have to try

this is for opening the QueryDesign:
http://api.openoffice.org/docs/common/ref/com/sun/star/sdb/QueryDesign.html

A very bad example:

Sub Main
    Dim aProps(1) as New com.sun.star.beans.PropertyValue
    aProps(0).Name = "DataSourceName"
    aProps(0).Value = "Bibliography"
    aProps(1).Name = "QueryDesignView"
    aProps(1).Value = true
oComp = StarDesktop.loadComponentFromURL(".component:DB/QueryDesign", "_blank", 0, aProps)

End Sub



For opening the query, executing it, you have to try
http://api.openoffice.org/docs/common/ref/com/sun/star/sdb/DataSourceBrowser.html

The components you see inside a frame in Writer/Calc when pressing F4, and the onwe when you open a table/view/query, are the same.

How it works? Never tried :-(
In a simple/dummy test I could open it, BUT with the tree on the left.

Seems you'll have to learn it all by yourself, because - AFAIK - there are no samples showing how to use all these API (another "where is Base?" ).

Regards
Ariel.



--
Ariel Constenla-Haile
La Plata, Argentina

[EMAIL PROTECTED]
[EMAIL PROTECTED]

http://www.ArielConstenlaHaile.com.ar/ooo/



"Aus der Kriegsschule des Lebens
                - Was mich nicht umbringt,
        macht mich härter."
                Nietzsche Götzendämmerung, Sprüche und Pfeile, 8.

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

Reply via email to