VARCHARs normally should not be trimmed (at least not by the framework). It as assumed that database does not pad VARCHARs with spaces, as this goes against the definition of VARCHAR (unlike CHARs where the behavior is undefined). So trailing spaces are assumed to have meaning to the user. This is why I was surprised by your report that MS Access does in fact pads VARCHARs. Maybe it simply doesn't support this data type?

Andrus


On May 25, 2006, at 8:52 AM, Øyvind Harboe wrote:

What's the correct behaviour for VARCHAR and trailing space, i.e.

foo.setVarCharProp("abc ");

for:

foo.getVarCharProp().equals("abc")
foo.getVarCharProp().equals("abc ")

Which should yield true or false?


--
Øyvind Harboe
http://www.zylin.com



Reply via email to