Hi Li Pan,

> com.sun.star.sdbc.XRowSet xRowSet = (com.sun.star.sdbc.XRowSet) UnoRuntime
>               .queryInterface(com.sun.star.sdbc.XRowSet.class, rowSet);
> ...
> xProp.setPropertyValue("DataSourceName", getDatasource());
> // datasource is "oradb"
> xProp.setPropertyValue("Command", getStatement());

Ah!

Try
  xProp.setPropertyValue( "CommandType", _
    com.sun.star.sdb.CommandType.QUERY )
  xProp.setPropertyValue( "Command", <query_name> )

This assumes that rowSet is an instance of the com.sun.star.sdb.RowSet
[1] service - is it?

Ciao
Frank

[1]http://api.openoffice.org/docs/common/ref/com/sun/star/sdb/RowSet.html

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

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

Reply via email to