Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: src/henplus/commands/ResultSetRenderer.java
- ===================================================================
- RCS file: /cvsroot/henplus/henplus/src/henplus/commands/ResultSetRenderer.java,v
- retrieving revision 1.22
- diff -u -r1.22 ResultSetRenderer.java
- --- src/henplus/commands/ResultSetRenderer.java 18 Jun 2005 04:58:13 -0000 1.22
- +++ src/henplus/commands/ResultSetRenderer.java 9 Jan 2008 14:12:42 -0000
- @@ -103,13 +103,19 @@
- Column[] currentRow = new Column[ columns ];
- for (int i = 0 ; i < columns ; ++i) {
- int col = (showColumns != null) ? showColumns[i] : i+1;
- - String colString;
- - if (meta.getColumnType( col ) == Types.CLOB) {
- - colString = readClob(rset.getClob( col ));
- - }
- - else {
- - colString = rset.getString( col );
- - }
- + String colString;
- + switch (meta.getColumnType( col )) {
- + case Types.CLOB:
- + colString = readClob(rset.getClob( col ));
- + break;
- + case Types.BIT:
- + case Types.BOOLEAN:
- + colString = rset.getObject(col) == null ? null : Boolean.toString(rset.getBoolean(col));
- + break;
- + default:
- + colString = rset.getString( col );
- + break;
- + }
- Column thisCol = new Column(colString);
- currentRow[i] = thisCol;
- }
Add Comment
Please, Sign In to add comment