Created
May 4, 2011 16:34
-
-
Save msroot/955530 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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