ComponentOne DataObjects for .NET
AutoIncrement Property (Field)

C1.Data.2 Assembly > C1.Data.SchemaObjects Namespace > Field Class : AutoIncrement Property
Gets or sets a value indicating whether the field automatically receives an incremented value for a new row added to the table.
Syntax
'Declaration
 
Public Overridable Property AutoIncrement As AutoIncrementEnum
public virtual AutoIncrementEnum AutoIncrement {get; set;}
Remarks
The most common way of implementing the autoincrement functionality is using the ClientAndServer option. In this case, your database field must be an autoincrement field (an integer field having autoincrement functionality in the database), and C1DataObjects implements autoincrement functionality on the client. When a new row is added on the client, the field receives a negative autoincrement value (both AutoIncrementSeed and AutoIncrementStep are equal to -1). C1DataObjects uses negative values on the client to ensure their uniqueness, to distinguish them from autoincremented values assigned by the database. When the new row is added to the database table on the server, C1DataObjects gets the autoincrement value assigned by the database and refreshes the field value on the client with this value. For this functionality to work with Oracle, Interbase and other databases that support sequence/generator objects, you must also set the AutoIncrementSequenceName property.
See Also

Reference

Field Class
Field Members
Table Fields
Keys Assigned by Server or Database