0

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.

user2594443
  • 95
  • 1
  • 1
  • 6

2 Answers2

2

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.

Anilof
  • 326
  • 2
  • 7
0

You need to rebuild your unique constraint like this:

create unique index uk_MyTable_ID on MyTable(upper(ID));
Steve
  • 5,585
  • 2
  • 18
  • 32