Hello Ray, > java.sql.Connection jj_cnct; > com.sun.star.sdbc.XConnection oo_cnct; > oo_cnct = ...; // require *.odb ZIP decompression > jj_cnct = UnoRuntime.queryInterface( java.sql.Connection.class, oo_cnct > ); > jj_cnct = oo_cnct.getJDBCconnection(); > // Would the polymorphism notion work as an alternative? > // do_universal_JDBC_SQL_processing( jj_cnct, jdbc_cnct_1, jdbc_rdbms_2, > ... ); > oo_cnct.close(); // require *.odb ZIP compression > > Is there a way to accomplish this conversion?
No there isn't at all. The SDBC connections are C++ implementations which implement some abstract UNO interfaces. Those interfaces are the only concepts which have a counterpart in Java - if you have a css.sdbc.XConnection in Java, this is merely a proxy (implementing a Java-equivalent of this interface) to the "real" implementation on the C++ side. Thus, you cannot cast to, or otherwise obtain, the java.sql.Connection, since this interface is completely unknown to the bridge between your Java UNO interfaces and the C++ UNO implementations. At least this is my understanding. There might be ways (I changed the summary to catch the attention of people with more knowledge about Java/UNO), but I strongly suppose they would require explicit coding on OOo side before they work - at least in the Base part, perhaps also in the bridges. Also, we would need to think about which leaks we would open with such an approach. Currently, the JDBC connection is wrapped into its SDBC counterparts, and there might be scenarios where modifying the former without the latter noticing it might be destructive. I can't think of such scenarios at the moment, but this would need closer examination. > Imagine telling colleagues to learn Base GUI for report generation. > They much prefer spreadsheet environment for analysis and report. For this, you might be delighted to hear that the Report designer, whose development was announced recently, allows to generate reports as Open Document Spreadsheet :) 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]
