It's all about IAM

Identity And Access Management - Rajiv Dewan

Java Code to Print ResultSet

Print all the column name and their values in the ResultSet

Use the below code snippet for same:

public static void printResultSet(tcResultSet result) throws tcAPIException, tcColumnNotFoundException{
for(int i = 0; i < result.getRowCount(); i++){
String column[] = result.getColumnNames();
for(int j = 0; j < column.length; j++){
String colName = column[j];
String value = result.getStringValue(colName);
System.out.println(colName + " --- " + value);

No comments:

Post a Comment