Bugs item #1081378, was opened at 2004-12-08 16:13 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1081378&group_id=22866
Category: JBossCMP Group: None Status: Open Resolution: None Priority: 5 Submitted By: Antti Lehto (anajavi) Assigned to: Nobody/Anonymous (nobody) Summary: CMP stores empty fields as spaces in Sybase Initial Comment: Platform: Linux, Solaris, WindowsXP JBoss 3.2.6 DB: Sybase Adaptive Server Enterprise 12.5 (on Solaris) JDK1.4.2_06 When cmp-field is left empty in CMPBean, JBoss generates SQL for insert with empty string: INSERT INTO user (login, password) VALUES ('TEST', '') Passing '' as a value to varchar column in Sybase causes it to store empty space. This behaviour is documented in Sybase manual as follows: "The empty string (" ") is treated as a single space. In char, nchar and unichar not null columns, the result is a column-length field of spaces." This can be tried out with: select len('') which returns 1. Sybase manual page for character datatypes: http://sybooks.sybase.com/onlinebooks/group-as/asg1250e/refman/@Generic__BookTextView/3571;pt=1908#X I think this is stupid from Sybase's side, but they have made it a feature. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=1081378&group_id=22866 ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development