OLE DB Property of Rowset and Command — «auto_gen_key_rule»
List of rules of key generation when a new row is inserted:
auto_gen_key_rule = <gen_key_rule>{;<gen_key_rule>}
<gen_key_rule> = {GEN | GEN_N | GEN_NI }.GeneratorName.<column_id>
<column_id> = {<aliase_column_name> | <full_column_name>}
<aliase_column_name> = name of column in result set
<full_columns_name> = BaseTableName.BaseColumnName
Description of control markers:
Marker | Description |
GEN | Always generate new value of column |
GEN_N | Generate new value if column value is NULL |
GEN_NI | Generate new value if column was not initialized |
Using these rules, the row set can automatically use generators for determining the values of the key (and not only) columns.
When you define names of generator, table and column you may use quoted names.
Example
If there is ID column in table MY_TABLE then you can define follow rule of key generation with using of GEN_ID_MY_TABLE generator:
auto_gen_key_rule | = | «GEN_NI.GEN_ID_MY_TABLE.ID» |
auto_gen_key_rule | = | «GEN_NI.GEN_ID_MY_TABLE.MY_TABLE.ID» |
If user did not set any value in column ID, then provider uses generator GEN_ID_MY_TABLE to get unique value.