Guest User

Untitled

a guest
Jul 18th, 2018
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. Index: src/henplus/commands/ResultSetRenderer.java
  2. ===================================================================
  3. RCS file: /cvsroot/henplus/henplus/src/henplus/commands/ResultSetRenderer.java,v
  4. retrieving revision 1.22
  5. diff -u -r1.22 ResultSetRenderer.java
  6. --- src/henplus/commands/ResultSetRenderer.java 18 Jun 2005 04:58:13 -0000 1.22
  7. +++ src/henplus/commands/ResultSetRenderer.java 9 Jan 2008 14:12:42 -0000
  8. @@ -103,13 +103,19 @@
  9. Column[] currentRow = new Column[ columns ];
  10. for (int i = 0 ; i < columns ; ++i) {
  11. int col = (showColumns != null) ? showColumns[i] : i+1;
  12. - String colString;
  13. - if (meta.getColumnType( col ) == Types.CLOB) {
  14. - colString = readClob(rset.getClob( col ));
  15. - }
  16. - else {
  17. - colString = rset.getString( col );
  18. - }
  19. + String colString;
  20. + switch (meta.getColumnType( col )) {
  21. + case Types.CLOB:
  22. + colString = readClob(rset.getClob( col ));
  23. + break;
  24. + case Types.BIT:
  25. + case Types.BOOLEAN:
  26. + colString = rset.getObject(col) == null ? null : Boolean.toString(rset.getBoolean(col));
  27. + break;
  28. + default:
  29. + colString = rset.getString( col );
  30. + break;
  31. + }
  32. Column thisCol = new Column(colString);
  33. currentRow[i] = thisCol;
  34. }
Add Comment
Please, Sign In to add comment