Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jdbc:odbc SQL2000 XML return?

 
Ryan Alexander
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, here's a good meaty question, what I'd *like* to do is submit a query through to SQL2000 and use it's ability to spit out the data in XML format.

example:
String query = "SELECT * from TestCams for XML AUTO";
Statement statement = m_connection.createStatement();
ResultSet resultSet = statement.executeQuery(query);
while (resultSet.next())
{%>
<%=resultSet.getString(1)%>
<%}%>
Problem in this case is, I get a string of numeric characters in response, not the actual XML, I'm almost curious if it's some kind of integer representation of the ascii characters..
Has anyone successfully done this?
Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic