Updated: 2023-11-07

Data Source Initialization OLE DB Property — «auto_insert_field_rule»

Name:
auto_insert_field_rule
Type:
VT_I2
R/W:
R/W
Default:
EMPTY
IBProvider:
2, 3, 5

Rule for generation of SQL query (INSERT INTO…) for insert a new row into updatable result set. Allowed values:

Value Description
0 Provider enumerates all the columns. Non-initialized columns are passed as NULL.
1 Provider enumerates only columns with NOT DEFAULT values. The provider may return error if there is no at least one initialized column.
2 Provider enumerates only OK-columns (those do not have DEFAULT or NULL values). The provider may return error, if all columns of new row are NULL or have DEFAULT values.

Focus attention that if table, in which new row is inserted, contains columns with DEFAULT values then you should set the property in 1.

The minimization of net traffic is ensured by values 1 and 2 of the property.

If you do not specify the value of this property, then the provider will choose the appropriate mode, taking into account the capabilities of the database server.

Value Conditional
1 Firebird 2.5+. If there are no initialized columns, the provider will generate a request «INSERT INTO … DEFAULT VALUES».
0 In all other cases.

See also

Other properties of group

Other sets of properties