Export (0) Print
Expand All

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.

System.Object
   System.Exception
      System.SystemException
         System.Data.DataException
            System.Data.InvalidConstraintException

[Visual Basic]
<Serializable>
Public Class InvalidConstraintException
   Inherits DataException
[C#]
[Serializable]
public class InvalidConstraintException : DataException
[C++]
[Serializable]
public __gc class InvalidConstraintException : public
   DataException
[JScript]
public
   Serializable
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.

Remarks

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.

Requirements

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

Show:
© 2014 Microsoft