ComponentOne DataObjects for .NET
Adding Rows and Primary Keys
DataObjects for .NET (Enterprise Edition) > Features and Techniques > Adding Rows and Primary Keys

Adding new rows often, if not always, presents a serious problem with poor help from standard data frameworks, including ADO.NET. Specifically, the problem of primary key values in the newly added rows. Primary keys, such as, ProductID, OrderID, and so on, are often assigned by a centralized procedure on the server or by the database itself (as AutoIncrement), so they are unknown until the new row is actually added to the database. That creates a lot of problems for GUI front ends that are commonly solved by restricting functionality, forcing early database updates and other objectionable techniques.

In this section, you will see how DataObjects for .NET solves this problem. We distinguish two different cases, two practical mechanisms of assigning primary keys to new rows. Primary key values can be assigned by the client application or by the server (or the database itself).

See Also