I think now is the time where you should submit an issue where you could attach the macro and the document (or example doc) to reproduce it. :-)

-- OJ


li pan wrote:
I use a datasource file.
I am sure it is a valid datasource file. It is not an XDataSource
object, but the I think the document says it is valid too.
I think maybe there is a different between our codes.
I used java to open a calc doc, and then I tried to open query
designer, then it failed.
But if I use java to open the datasource file, I can open the query designer.

If I run the same marco on the same document outside java, every thing is ok.


2006/5/29, Ocke Janssen <[EMAIL PROTECTED]>:
I wrote a own program in Java, too. When connected to the office, I
create a new connection to db of my choice and used this connection as
parameter for the query designer.
When you set the data source, does that mean you have an XDataSource
object (or any other X-interface supported by the data source) at your
fingers?

- OJ

li pan wrote:
> Hmm, I have set DataSource for it, it can run.
> But my poblem is, it can run in openoffice, but can't run in a
> officebean embedded in java.
>
> 2006/5/29, Ocke Janssen <[EMAIL PROTECTED]>:
>> Hi li pan,
>>
>> you have to insert a extra property in the loadComponentFromURL call.
>> The querydesign needs a data source, a connection, or the registered
>> name of the data source.
>>
>> The property names are:
>> DataSource
>> ActiveConnection
>> DataSourceName
>>
>> Choose one of them and set the value accordingly. :-) I used the
>> ActiveConnection property.
>>
>> Best regards,
>>
>> Ocke
>>
>> li pan wrote:
>> > Well.The datasource is not the problem
>> > I have fixed my datasource, it work well outside officebean.
>> > But still won't work in officebean.
>> > the query frame did appear, but nothing in it.
>> > and
>> > loadComponentFromURL
>> > returned null
>> >
>> > 2006/5/26, li pan <[EMAIL PROTECTED]>:
>> >> Sorry, the datasource I used was not valid.
>> >> I think it would be better if I can get a error message.
>> >>
>> >> 2006/5/26, li pan <[EMAIL PROTECTED]>:
>> >> > I tried different urls and only
>> >> > ".component:DB/QueryDesign"
>> >> > doesn't work
>> >> >
>> >> > ".component:DB/FormGridView" or "file:///F:\test.ods" work.
>> >> >
>> >> > Don't know why:(
>> >> >
>> >> >
>> >> > 2006/5/26, li pan <[EMAIL PROTECTED]>:
>> >> > > Hi
>> >> > > I was trying to open QueryDesign using openbasic marco, like this
>> >> > >
>> >> > > QueryDesign = frame.loadComponentFromURL(
>> >> ".component:DB/QueryDesign",
>> >> > > "_self", 0, _Array( MakePropertyValue( "DataSourceName",
>> >> dataSource )
>> >> > > ) )
>> >> > >
>> >> > > It was OK. But if I run the marco in a officebean which is
>> >> embedded in
>> >> > > a java application, the QueryDesign won't open, and no error
>> message
>> >> > > will be given.
>> >> > >
>> >> > > I am using OpenOffice 2.0.1 on windows.
>> >> > > Any idea?
>> >> > >
>> >> >
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>>
>>
>> --
>> Ocke Janssen                      Tel: +49 40 23646 661, x66661
>> Dipl. Inf(FH)                     Fax: +49 40 23646 550
>> Sun Microsystems Inc.
>> Nagelsweg 55                     mailto:[EMAIL PROTECTED]
>> D-20097 Hamburg                   http://www.sun.com/staroffice
>>
>>                        Example isn't another way to teach,
>>                        it is the only way to teach.
>>                        Albert Einstein
>>
>> ---------------------------------------------------------------------
>> 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]
>


--
Ocke Janssen                      Tel: +49 40 23646 661, x66661
Dipl. Inf(FH)                     Fax: +49 40 23646 550
Sun Microsystems Inc.
Nagelsweg 55                     mailto:[EMAIL PROTECTED]
D-20097 Hamburg                   http://www.sun.com/staroffice

                       Example isn't another way to teach,
                       it is the only way to teach.
                       Albert Einstein

---------------------------------------------------------------------
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]



--
Ocke Janssen                      Tel: +49 40 23646 661, x66661
Dipl. Inf(FH)                     Fax: +49 40 23646 550
Sun Microsystems Inc.
Nagelsweg 55                     mailto:[EMAIL PROTECTED]
D-20097 Hamburg                   http://www.sun.com/staroffice

Example isn't another way to teach, it is the only way to teach. Albert Einstein

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

Reply via email to