commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgra...@apache.org
Subject cvs commit: jakarta-commons/dbutils/src/java/org/apache/commons/dbutils QueryRunner.java
Date Mon, 23 Aug 2004 01:51:50 GMT
dgraham     2004/08/22 18:51:50

  Modified:    dbutils/src/java/org/apache/commons/dbutils QueryRunner.java
  Log:
  Changed null handling in fillStatement() to use Types.VARCHAR instead
  of Types.OTHER.  PR: 29212
  
  Revision  Changes    Path
  1.14      +4 -1      jakarta-commons/dbutils/src/java/org/apache/commons/dbutils/QueryRunner.java
  
  Index: QueryRunner.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/dbutils/src/java/org/apache/commons/dbutils/QueryRunner.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- QueryRunner.java	19 Jul 2004 01:44:42 -0000	1.13
  +++ QueryRunner.java	23 Aug 2004 01:51:50 -0000	1.14
  @@ -135,7 +135,10 @@
               if (params[i] != null) {
                   stmt.setObject(i + 1, params[i]);
               } else {
  -                stmt.setNull(i + 1, Types.OTHER);
  +                // VARCHAR works with many drivers regardless
  +                // of the actual column type.  Oddly, NULL and 
  +                // OTHER don't work with Oracle's drivers.
  +                stmt.setNull(i + 1, Types.VARCHAR);
               }
           }
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message