rs = client.processQuery(sql); //rs is a ResultSet and client is a JDBCClient
while (rs.next()) {
System.out.println(rs.getLong("SEARCH_CONDITION")); //this throws an SQLException
checks.addElement(rs.getString("COLUMN_NAME")); //this works fine
}
here is the SQLException that I get:
java.sql.SQLException: Message file 'oracle.jdbc.dbaccess.Messages' is missing.
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
at oracle.jdbc.dbaccess.DBDataSetImpl.getStreamItem(DBDataSetImpl.java:1087)
at oracle.jdbc.driver.OracleStatement.getBytesInternal(OracleStatement.java:2489)
at oracle.jdbc.driver.OracleStatement.getLongValue(OracleStatement.java:3170)
at oracle.jdbc.driver.OracleResultSetImpl.getLong(OracleResultSetImpl.java:335)
at oracle.jdbc.driver.OracleResultSet.getLong(OracleResultSet.java:1432)
at edu.wpi.cs.dsrg.xmldb.common.ASG.XAT2ASG.getKeysAndConstraints(XAT2ASG.java:740) <-- this is where the System.out.println(rs.getLong("SEARCH_CONDITION")); call is.
at edu.wpi.cs.dsrg.xmldb.common.ASG.XAT2ASG.convertXAT2ASGs(XAT2ASG.java:302)
at edu.wpi.cs.dsrg.xmldb.UFilter.test.TestXAT2ASG.main(TestXAT2ASG.java:53)
When I get the ResultSet's metadata, it tells me that there are two columns and the second is named "SEARCH_CONDITION" and is of type "LONG" but I cant get it out, no matter what I try.
Can you please elaborate on how to get my sql statement into the PreparedStatement using the setAsciiStream() function?
I tried putting my sql string into StreamBufferInputStream and then passing it into the PreparedStatement.setAsciiStream() function, but then PreparedStatement.executeQuery() resulted in an error, which said the SQL command was invalid.
Bookmarks