Re: The XSL-List Digest V2 #594

Subject: Re: The XSL-List Digest V2 #594
From: Matthew Cordes <mcorde61@xxxxxxxxx>
Date: Mon, 10 Apr 2000 11:47:46 -0400
Thanks for replying...

> Instead of calling getString(1) like you would do get the 1st column as
> as string value, you call:
> 
>   getCursor(1) 

This method doesn't appear to be part of jdbc 2.0, the only method that 
explicitly mentioned cursor in its name was getCursorName(), which I'm 
sure is not what you are refering to.  I looked in the documentation for
both the jdk1.2 and 1.3 and this method did not appear to exist in either.

>    OracleXMLQuery oxq = new OracleXMLQuery(yourConnection, yourSQL);
>    Document d = oxq.getXMLDOM(); // to return results as a DOM tree or
>    String   s = oxq.getXMLString(); // to return results as XML "text"

When I do this, all I seem to get as output is an empty ResultSet, 
perhaps you can see my mistake?

// Objects: Connection dbConn, Statement dbStat already exist

	String dbQuery =  "select CATEGORY, cursor (select SUBJECT, 
	NAME, ALIAS from HOUSER.SPEAKER_TOPICS b where b.CATEGORY 
	= a.CATEGORY ) as CHILDDATA from HOUSER.SPEAKER_TOPICS a  
	group by CATEGORY";

	Statement dbStat = dbConn.createStatement();
	ResultSet rs = dbStat.executeQuery( dbQuery );

    OracleXMLQuery oxq = new OracleXMLQuery(dbConn, rs);

	String s = oxq.getXMLString();
	System.out.println( "DOM: " + s );


This always results in this output:
	
DOM: <?xml version = '1.0'?>
<ROWSET/>

	
Again, I really appreciate your help thus far.

-matt


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread