Gets a value indicating whether AutoIncrement is supported.
[Visual Basic] Public ReadOnly Property AutoIncrementSupported As Boolean [C#] public bool AutoIncrementSupported {get;} [C++] public: __property bool get_AutoIncrementSupported(); [JScript] public function get AutoIncrementSupported() : Boolean;
true if AutoIncrement is supported; otherwise, false.
UNDONE: Not in spec, used by MarkAsh. Investigate.
The following example checks the AutoIncrementSupported property before setting the AutoIncrement, AutoIncrementSeed, and AutoIncrementStep properties.
[Visual Basic]
Private Sub AddAutoIncrementColumn() Dim myColumn As DataColumn = New DataColumn myColumn.DataType = System.Type.GetType("System.Int32") If myColumn.AutoIncrementSupported Then With MyColumn .AutoIncrement = True .AutoIncrementSeed = 1000 .AutoIncrementStep = 10 End With End If ' Add the column to a new DataTable Dim myTable As DataTable myTable = New DataTable myTable.Columns.Add(myColumn) End Sub
DataColumn Class | DataColumn Members | System.Data Namespace | AutoIncrement | AutoIncrementSeed | AutoIncrementStep | Expression | ItemArray