添加新行时,数据表命中大小写敏感的唯一约束 [英] Datatable hit case sensitive unique constraint when add new row

查看:74
本文介绍了添加新行时,数据表命中大小写敏感的唯一约束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在数据表中添加新行时遇到了唯一约束。

I hit unique constraint when add new row in datatable.

我的唯一字段是ID。

ID

==

abc

ABC

如何禁用数据表中的区分大小写检查。

How to disable the sensitive case checking in datatable.

我在不起作用之前使用datatable.casesensitive = false

I use datatable.casesensitive = false before not work for me.

推荐答案

在数据表上设置PrimaryKey属性之前使用CaseSensitive = true,它将区分大小写。我遇到了同样的问题,这就是我的解决方法。

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.

这篇关于添加新行时,数据表命中大小写敏感的唯一约束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆