0 Replies Latest reply on Jun 6, 2005 10:26 AM by lduperval

    JBoss 3.2.5 ans SQL Server: using Y/N instead of 0/1 for boo

    lduperval

      Hi,

      We have legacy data that uses varchar(1) 'Y'/'N' for boolean values, instead of 0/1. Our database is SQL Server 2000. I'm trying to figure out how to make my booleans map to 'Y'/'N' instead of 0/1. In my configuration, I changed the follwing in standardjbosscmp-jdbc.xml:

      <type-mapping>
      MS SQLSERVER2000
      <true-mapping>Y</true-mapping>
      <false-mapping>N</false-mapping>

      <java-type>java.lang.Boolean</java-type>
      <jdbc-type>VARCHAR</jdbc-type>
      <sql-type>VARCHAR(1)</sql-type>

      </type-mapping>

      I am using the latest jtds driver, but my boolean fields still map to 0/1 instat of Y/N.

      Can anyone help?

      Thanks,

      L