Title: BUG: Java char to and from MS SQL 7.0 char(1) conversions do not work!!!
Char(1) in beans is a java String with only 1 in length, i had this problem before, and mapping it to a char dont work, but String works.
 
Klaus
-----Oprinnelig melding-----
Fra: Byron du Preez [mailto:[EMAIL PROTECTED]]
Sendt: 29. juni 2000 17:12
Til: Orion-Interest
Emne: BUG: Java char to and from MS SQL 7.0 char(1) conversions do not work!!!

BUG:  Java char to and from MS SQL 7.0 char(1) conversions do not work!!!

Using Orion 1.0 and standard MS SQL mapping of char, i.e.

        <type-mapping type="char" name="char" />

makes CHAR(1) fields unusable.  Reading a CHAR(1) field via
a char field in a CMP Entity Bean always returns a "space"
(or what looks like a space).  Setting one of three char fields
(e.g. to 'A', 'H', 'E') in a CMP entity bean, shows up in the
MS SQL 7.0 database when viewed through MS SQL Enterprise
Manager with the following problems:
        1).  the char field that was set in the entity shows up
        as a '*' (?) in the CHAR(1) database column, regardless
        of what was set.
        2).  the other char fields that were NOT EXPLICITLY SET,
        ALTER the other CHAR(1) database columns on the same row
        so that their contents show as 0.

Please help, we don't want to have to revisit all our code to
convert char's to Strings to get it to work!!! ...

A workaround of questionable use is to map char's to smallint's,
but then the database shows an ASCII/UNICODE integer value
instead of the character itself.....

Thanks in advance
Byron

Reply via email to