Skip to content

Instantly share code, notes, and snippets.

@msroot
Created May 4, 2011 16:34
Show Gist options
  • Save msroot/955530 to your computer and use it in GitHub Desktop.
Save msroot/955530 to your computer and use it in GitHub Desktop.
/**
* prints all the information in the rows from a SesultSet usefull for
* testing a debugging
*
* @param rset
*/
public static void dumpResultSet(ResultSet rSet) {
try {
// rSet.beforeFirst();
while (rSet.next()) {
for (int i = 1; i <= rSet.getMetaData().getColumnCount(); i++) {
System.out.print(rSet.getString(i) + ", ");
}
System.out.println();
}
// rset.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment