Often tables are defined with one or more columns that are not nullable, but have default values assigned. This is often used in situations where a column is a primary key column, and so cannot be nullable, but frequently has one particular value (other fields in the primary key satisfy the uniqueness requirements).
If you use the default add method that Data Access Builder generates to add a row, you must provide a non-null value for this type of column (otherwise, an exception is thrown), which defeats the purpose of having default values. So instead of using the default add method, define your own method for adding rows with default field values.
To define this type of method, do the following steps:
Use the method that is generated to add rows without having to specify attribute values for non-nullable columns that have default values.
![]()
Add
User-Defined Methods with Customized SQL Statements
Modify
User-Defined Methods
