db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/platforms PlatformMsAccessImpl.java
Date Fri, 28 Nov 2003 16:16:12 GMT
brj         2003/11/28 08:16:11

  Modified:    src/java/org/apache/ojb/broker/platforms
                        PlatformMsAccessImpl.java
  Log:
  MsAccess does not like long, so convert to int 
  patch by Tino Schöllhorn
  
  Revision  Changes    Path
  1.6       +12 -2     db-ojb/src/java/org/apache/ojb/broker/platforms/PlatformMsAccessImpl.java
  
  Index: PlatformMsAccessImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/platforms/PlatformMsAccessImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PlatformMsAccessImpl.java	4 Jun 2003 19:11:21 -0000	1.5
  +++ PlatformMsAccessImpl.java	28 Nov 2003 16:16:11 -0000	1.6
  @@ -108,11 +108,21 @@
                   super.setObjectForStatement(ps, index, value, sqlType);
               }
           }
  +        // patch by Tino Schöllhorn 
  +        // Current ODBC-Implementation for Access (I use ODBC 4.0.xxxx) does not 
  +        // support the conversion of LONG values. 
  +        // Error is : "Optional feature not implemented"
  +        // So I try to pass the LONG-value as an Integer even though it might be possible
  +        // that the conversion fails - but I don't think that is an issues with Access
anyway.
  +        else if (value instanceof Long)
  +        {
  +            ps.setInt(index,((Long)value).intValue());
  +        }
           else
           {
  -            super.setObjectForStatement(ps, index, value, sqlType);
  +            super.setObjectForStatement(ps, index, value, sqlType);        
           }
  -    }
  +    }        
   
       /**
        * @see Platform#beforeStatementClose(Statement stmt, ResultSet rs)
  
  
  

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


Mime
View raw message