Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
InvalidConstraintException Class
Collapse the table of content
Expand the table of content

InvalidConstraintException Class

Represents the exception that is thrown when incorrectly attempting to create or access a relation.

For a list of all members of this type, see InvalidConstraintException Members.


[Visual Basic]
Public Class InvalidConstraintException
   Inherits DataException
public class InvalidConstraintException : DataException
public __gc class InvalidConstraintException : public
class InvalidConstraintException extends DataException

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


The InvalidConstraintException is thrown when incorrectly invoking the following methods while attempting to create or access a relation.

If you call Add, the InvalidConstraintException may be thrown if a relation cannot be created based on the values supplied in the parameters. If you call Clear, the InvalidConstraintException may be thrown if a ForeignKeyConstraint is enforced on the DataRowCollection. If you call GetParentRow, the InvalidConstraintException may be thrown if the columns have different data types or the tables do not belong to the same DataSet.


Namespace: System.Data

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

Assembly: System.Data (in System.Data.dll)

See Also

InvalidConstraintException Members | System.Data Namespace

© 2015 Microsoft