Добрый вечер.
Подскажите пожалуйста как вычитать весь ResultSet после вызова SYSPROC.ADMIN_CMD('describe table table_name show detail') в файл ну или вывести на экран.
public void describeTable(String tabname){
Connection conn = openConnection();
try{
PreparedStatement pstmt = null;
ResultSet rset = null;
String exp_stmt = "CALL SYSPROC.ADMIN_CMD('describe table " + tabname + " show detail') ";
pstmt=conn.prepareStatement(exp_stmt);
pstmt.execute();
rset = pstmt.getResultSet();
String file_name = ddlPath + tabname + ".ddl";
//вывести результат в файл
}catch (SQLException ex){
System.out.println("SQLException caught");
System.out.println("---");
while ( ex != null ){
System.out.println("Message : " + ex.getMessage());
System.out.println("SQLState : " + ex.getSQLState());
System.out.println("ErrorCode : " + ex.getErrorCode());
System.out.println("---");
ex = ex.getNextException();
}catch(Exception e){
e.printStackTrace();
}
closeConnection(conn);
return;
}