System.data.constraintexception:无法启用约束。一行或多行包含违反非null,唯一或外键约束的值。 [英] System.data.constraintexception: failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.

查看:321
本文介绍了System.data.constraintexception:无法启用约束。一行或多行包含违反非null,唯一或外键约束的值。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Line 2960:            this.Adapter.SelectCommand = this.CommandCollection[5];
Line 2961:            CDS.ADDJOB_SELECTDataTable dataTable = new CDS.ADDJOB_SELECTDataTable();
Line 2962:            this.Adapter.Fill(dataTable);
Line 2963:            return dataTable;
Line 2964:        }





我尝试过:





What I have tried:

public partial class AddEducation : System.Web.UI.Page
   {
       SDS.SELECT_ADDEDUDataTable EDT = new SDS.SELECT_ADDEDUDataTable();
       SDSTableAdapters.SELECT_ADDEDUTableAdapter EAdapter = new SDSTableAdapters.SELECT_ADDEDUTableAdapter();

推荐答案

这是一个通用的错误消息,可能是由几件事引起的(其中大部分都不是SQL相关)。

见这里:无法启用约束。一行或多行包含违反非null,唯一或外键约束的值。 - Google搜索 [ ^ ]你会发现大多数常见问题,以及如何修复它们。



我们不能为你做到这一点 - 我们没有访问您的表或您的数据库。
This is a generic error message, which can be caused by several things (and most of them aren't SQL related).
See here: failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints. - Google Search[^] and you will find most of teh common problems, and how to fix them.

We can't do that for you - we don't have access to your table or your database.


这篇关于System.data.constraintexception:无法启用约束。一行或多行包含违反非null,唯一或外键约束的值。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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