aspose file tools*
The moose likes JDBC and the fly likes jdbc:odbc SQL2000 XML return? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "jdbc:odbc SQL2000 XML return?" Watch "jdbc:odbc SQL2000 XML return?" New topic
Author

jdbc:odbc SQL2000 XML return?

Ryan Alexander
Greenhorn

Joined: May 23, 2001
Posts: 8
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!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: jdbc:odbc SQL2000 XML return?