This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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!
 
Consider Paul's rocket mass heater.
 
subject: jdbc:odbc SQL2000 XML return?
 
Similar Threads
Something wrong in returning ResultSet
Why do these queries break this loop????? Im lost!
sql query --on the fly
Database escape char.
ResultSet containing XML from SQL server 2000