Thread

  1. jdbc driver: Support for 'BOOL'

    Jos Antonio Matute Calvo <cmaj@encomix.es> — 2001-01-10T16:31:30Z

    Problem:
        If try to use field of type "java.sql.Types.BIT" obtains error "Unknown
    Types Value"
    
    Resolution:
    
        Add this:
    
        PreparedStatement.java
        460,461d459
        <                       case Types.BIT:
        <                               set(parameterIndex,
    ((Boolean)x).booleanValue() ? "true" : "false");
    
    
    Jose A. Matute Calvo
    Daratel, S.L.
    Zaragoza - Spain.
    
    
    
    
  2. Re: [INTERFACES] jdbc driver: Support for 'BOOL'

    Joseph Shraibman <jks@selectacast.net> — 2001-01-15T19:53:36Z

    "José Antonio Matute Calvo" wrote:
    > 
    > Problem:
    >     If try to use field of type "java.sql.Types.BIT" obtains error "Unknown
    > Types Value"
    > 
    > Resolution:
    > 
    >     Add this:
    > 
    >     PreparedStatement.java
    >     460,461d459
    >     <                       case Types.BIT:
    >     <                               set(parameterIndex,
    > ((Boolean)x).booleanValue() ? "true" : "false");
    
    Why not set(parameterIndex,x.toString())?
    
    
    -- 
    Joseph Shraibman
    jks@selectacast.net
    Increase signal to noise ratio.  http://www.targabot.com
    
    
  3. Re: [INTERFACES] jdbc driver: Support for 'BOOL'

    Bruce Momjian <pgman@candle.pha.pa.us> — 2001-01-24T14:19:02Z

    Is this a bug?  Can someone submit a patch?
    
    
    [ Charset ISO-8859-1 unsupported, converting... ]
    > "Jos? Antonio Matute Calvo" wrote:
    > > 
    > > Problem:
    > >     If try to use field of type "java.sql.Types.BIT" obtains error "Unknown
    > > Types Value"
    > > 
    > > Resolution:
    > > 
    > >     Add this:
    > > 
    > >     PreparedStatement.java
    > >     460,461d459
    > >     <                       case Types.BIT:
    > >     <                               set(parameterIndex,
    > > ((Boolean)x).booleanValue() ? "true" : "false");
    > 
    > Why not set(parameterIndex,x.toString())?
    > 
    > 
    > -- 
    > Joseph Shraibman
    > jks@selectacast.net
    > Increase signal to noise ratio.  http://www.targabot.com
    > 
    
    
    -- 
      Bruce Momjian                        |  http://candle.pha.pa.us
      pgman@candle.pha.pa.us               |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
    
    
  4. Re: [INTERFACES] jdbc driver: Support for 'BOOL'

    Bruce Momjian <pgman@candle.pha.pa.us> — 2001-01-25T03:31:38Z

    Seems the BIT type works in Java 7.1 beta now.
    
    [ Charset ISO-8859-1 unsupported, converting... ]
    > "Jos? Antonio Matute Calvo" wrote:
    > > 
    > > Problem:
    > >     If try to use field of type "java.sql.Types.BIT" obtains error "Unknown
    > > Types Value"
    > > 
    > > Resolution:
    > > 
    > >     Add this:
    > > 
    > >     PreparedStatement.java
    > >     460,461d459
    > >     <                       case Types.BIT:
    > >     <                               set(parameterIndex,
    > > ((Boolean)x).booleanValue() ? "true" : "false");
    > 
    > Why not set(parameterIndex,x.toString())?
    > 
    > 
    > -- 
    > Joseph Shraibman
    > jks@selectacast.net
    > Increase signal to noise ratio.  http://www.targabot.com
    > 
    
    
    -- 
      Bruce Momjian                        |  http://candle.pha.pa.us
      pgman@candle.pha.pa.us               |  (610) 853-3000
      +  If your life is a hard drive,     |  830 Blythe Avenue
      +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026
    
    
  5. Re: Re: [INTERFACES] jdbc driver: Support for 'BOOL'

    Peter T Mount <peter@retep.org.uk> — 2001-01-25T13:26:50Z

    Quoting Bruce Momjian <pgman@candle.pha.pa.us>:
    
    > 
    > Is this a bug?  Can someone submit a patch?
    
    Why not setBoolean(parameterIndex,((Boolean)x),booleanValue());
    
    Also, unless it's changed postgres accepts 't' & 'f' not 'true' or 'false'?
    
    Also, which PreparedStatement.java are we taking about, as there are 2 of them?
    
    Peter
    
    > 
    > 
    > [ Charset ISO-8859-1 unsupported, converting... ]
    > > "Jos? Antonio Matute Calvo" wrote:
    > > > 
    > > > Problem:
    > > >     If try to use field of type "java.sql.Types.BIT" obtains error
    > "Unknown
    > > > Types Value"
    > > > 
    > > > Resolution:
    > > > 
    > > >     Add this:
    > > > 
    > > >     PreparedStatement.java
    > > >     460,461d459
    > > >     <                       case Types.BIT:
    > > >     <                               set(parameterIndex,
    > > > ((Boolean)x).booleanValue() ? "true" : "false");
    > > 
    > > Why not set(parameterIndex,x.toString())?
    > > 
    > > 
    > > -- 
    > > Joseph Shraibman
    > > jks@selectacast.net
    > > Increase signal to noise ratio.  http://www.targabot.com
    > > 
    > 
    > 
    > -- 
    >   Bruce Momjian                        |  http://candle.pha.pa.us
    >   pgman@candle.pha.pa.us               |  (610) 853-3000
    >   +  If your life is a hard drive,     |  830 Blythe Avenue
    >   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania
    > 19026
    > 
    
    
    
    -- 
    Peter Mount peter@retep.org.uk
    PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
    RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/
    
    
  6. Re: Re: [INTERFACES] jdbc driver: Support for 'BOOL'

    Peter T Mount <peter@retep.org.uk> — 2001-01-26T09:26:16Z

    Quoting Bruce Momjian <pgman@candle.pha.pa.us>:
    
    > 
    > Seems the BIT type works in Java 7.1 beta now.
    
    Has anything changed with boolean types in the backend then, as nothing has 
    been done on the JDBC side?
    
    > 
    > [ Charset ISO-8859-1 unsupported, converting... ]
    > > "Jos? Antonio Matute Calvo" wrote:
    > > > 
    > > > Problem:
    > > >     If try to use field of type "java.sql.Types.BIT" obtains error
    > "Unknown
    > > > Types Value"
    > > > 
    > > > Resolution:
    > > > 
    > > >     Add this:
    > > > 
    > > >     PreparedStatement.java
    > > >     460,461d459
    > > >     <                       case Types.BIT:
    > > >     <                               set(parameterIndex,
    > > > ((Boolean)x).booleanValue() ? "true" : "false");
    > > 
    > > Why not set(parameterIndex,x.toString())?
    > > 
    > > 
    > > -- 
    > > Joseph Shraibman
    > > jks@selectacast.net
    > > Increase signal to noise ratio.  http://www.targabot.com
    > > 
    > 
    > 
    > -- 
    >   Bruce Momjian                        |  http://candle.pha.pa.us
    >   pgman@candle.pha.pa.us               |  (610) 853-3000
    >   +  If your life is a hard drive,     |  830 Blythe Avenue
    >   +  Christ can be your backup.        |  Drexel Hill, Pennsylvania
    > 19026
    > 
    
    
    
    -- 
    Peter Mount peter@retep.org.uk
    PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
    RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/