db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/platforms PlatformMsAccessImpl.java
Date Wed, 04 Jun 2003 19:11:22 GMT
thma        2003/06/04 12:11:21

  Modified:    src/java/org/apache/ojb/broker/platforms
                        PlatformMsAccessImpl.java
  Log:
  stupid me, I found a simple workaround...
  
  Revision  Changes    Path
  1.5       +5 -7      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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PlatformMsAccessImpl.java	4 Jun 2003 19:02:03 -0000	1.4
  +++ PlatformMsAccessImpl.java	4 Jun 2003 19:11:21 -0000	1.5
  @@ -52,8 +52,7 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -import java.io.StringBufferInputStream;
  -import java.io.InputStream;
  +import java.io.ByteArrayInputStream;
   import java.math.BigDecimal;
   import java.sql.PreparedStatement;
   import java.sql.ResultSet;
  @@ -99,11 +98,10 @@
               {
                   String s = (String) value;
                   // ps.setCharacterStream(index, new StringReader(s), s.length());
  -                // for MSACCESS :
  -                
  -                InputStream ins = new StringBufferInputStream(s);
  -                
  -                ps.setAsciiStream(index, ins, s.length());
  +                // for MSACCESS :                
  +                byte[] bytes = s.getBytes();
  +                ByteArrayInputStream bais = new ByteArrayInputStream(bytes);          
     
  +                ps.setAsciiStream(index, bais, bytes.length);
               }
               else
               {
  
  
  

Mime
View raw message