问题
I hit unique constraint when add new row in datatable.
my unique field is ID.
ID
==
abc
ABC
How to disable the sensitive case checking in datatable.
I use datatable.casesensitive = false before not work for me.
回答1:
Use CaseSensitive = true before setting the PrimaryKey property on the datatable and it will be case-sensitive. I had the same problem and this is how I fixed it.
回答2:
You need to rebuild your unique constraint like this:
create unique index uk_MyTable_ID on MyTable(upper(ID));
来源:https://stackoverflow.com/questions/19584916/datatable-hit-case-sensitive-unique-constraint-when-add-new-row