none
Full-width; half-width comparison in dataset

    Question

  • Hi,

     I am using dataset in my application. The issue is if I add a row with a value of 'AKHIL' to the dataset column in half-width characters and then I try to add another row with value as 'AKHIL' but in full-width to the same column. My comparison rows.contains succeeds and I am not able to add the row to my dataset

    But if I set the CaseSensitive property of DataSet to true and then try the same operation I am able to add the row to the dataset.

    Is this is the expected behavior? why this is happening.

    thanks,

    Akhil Goel

    Friday, May 05, 2006 11:02 AM

Answers

  • The default for CaseSensitive is false, which means that default comparisons of SqlString values will be done using IgnoreCase, IgnoreKanaType, and IgnoreWidth. If you set CaseSensitive to true, none of these things are ignored. Therefore, by default a half-width character is the same as the full-width version of the same character. When CaseSensitive is true, they are different.

    Thanks,

    Sarah

    Friday, May 05, 2006 11:25 PM