Format Specific Commit Types

<< Click to Display Table of Contents >>

Navigation:  EDP > Customizability >

Format Specific Commit Types

Formats can be customized to use a different commit type for different data tables. To do this, the UpdateMode method can be overridden in the format's custom handler (i.e., *.cs/*.vb file). An example can be found below:

 

EDP_Format-Specific-Custom-Handler-Code-Example

 

In the example above, the format is designed to commit data to the DT_SAMPLE and DT_FIELD_SAMPLE tables through Insert and Merge, but all other tables would use Insert and Update. The available update modes (displayed in bold text) and the resulting behavior of each mode are listed below:

EarthSoft.Common.Data.Connection.UpdateModes.None

Used only during INSERT when existing rows should be left alone.

EarthSoft.Common.Data.Connection.UpdateModes.Replace

Every non-key field is updated, regardless of NULL values.

EarthSoft.Common.Data.Connection.UpdateModes.Merge

Only NULL values (in existing records) are updated, existing values are not updated.

EarthSoft.Common.Data.Connection.UpdateModes.Update

Any new value will be saved, regardless of whether the existing value is NULL or not, but NULL values will not be overwrite existing values.

EarthSoft.Common.Data.Connection.UpdateModes.UpdateOnly

Does not insert new records. Any new value will be saved, regardless of whether the existing value is NULL or not, but NULL values will not overwrite existing values.

EarthSoft.Common.Data.Connection.UpdateModes.MergeOnly

Does not insert new records. Only NULL values (in existing records) are updated, existing values are not overwritten.

EarthSoft.Common.Data.Connection.UpdateModes.ReplaceOnly

Does not insert new records. Every non-key field is updated, regardless of NULL values.

 

After adding this method to the custom handler and rebuilding the format, the Format Specific commit type option will be available in Professional EDP (see below). More information can be found in the Professional EDP – Commit article.

 

EDP_Format-Specific-Commit-Type

 

Selecting the Format Specific option will utilize the customized custom handler code while committing data.

 

To use the Format Specific option in Enterprise EDP, use the Format (or Default) commitType when configuring the EQuIS Format Definitioin (EFD). More information can be found in the EQuIS Format Definition Configuration article regarding the EFD configuration in the ST_CONFIG table, and more information can be found in the Enterprise Workflow Widget article regarding the EFD configuration through the Workflow widget.