DBMapper Class
DBMappers are used to store a range of data in Excel to the database. A special type of DBMapper is the CUD DBMapper for realizing the former DBSheets
Inheritance Hierarchy
- System.Object
- DBaddin.DBModif
- DBaddin.DBMapper
- DBaddin.DBModif
Namespace: DBaddinAssembly: DBaddin in (DBaddin.dll)
Syntax
public class DBMapper : DBModif
The DBMapper type exposes the following members.
Constructors
Class | Summary | |
---|---|---|
DBMapper(CustomXMLNode, Range) | constructor with definition XML |
Methods
Name | Summary | |
---|---|---|
addHiddenFeatureDefs(CustomXMLNode) | to re-add hidden features only available in XML | |
DBModifSaveNeeded() | checks whether DBModifier needs saving, either because execOnSave is set or in case of CUD DBMappers if any i/u/d Flags are present | |
doDBModif(Boolean, String, Boolean) | execute the modifications for the DB Mapper by storing the data modifications in the DBMapper range to the database | |
extendDataRange() | extend DataRange to "whole" DBMApper area (first row (header/field names) to the right and first column (first primary key) down) | |
hadChanges() | ||
insertCUDMarks(Range, Boolean) | inserts CUD (Create/Update/Delete) Marks at the right end of the DBMapper range | |
notifyUserOfDataError(String, Int64, Int32) | notification of error for user including selection of error cell | |
resetCUDFlags() | reset CUD FLags, either after completion of doDBModif or on request (refresh) | |
setDBModifCreateFields(ref DBModifCreate) | set the fields in the DB Modifier Create Dialog with attributes of object |
Fields
Name | Description | |
---|---|---|
AutoIncFlag | first column is treated as an auto-incrementing key column, needed to ignore empty values there (otherwise DBMappers stop here) | |
avoidFill | prevent filling of whole table during execution of DB Mappers, this is useful for very large tables that are incrementally filled and would take unnecessary long time to start the DB Mapper. If set to true then each record is searched independently by going to the database. If the records to be stored are not too many, then this is more efficient than loading a very large table. | |
changesDone | used to pass whether changes were done | |
CUDFlags | respect C/U/D Flags (DBSheet functionality) | |
deleteBeforeMapperInsert | if set, delete table before inserting the contents of DBMapper | |
executeAdditionalProc | additional stored procedure to be executed after saving | |
ignoreColumns | columns to be ignored (helper columns) | |
IgnoreDataErrors | if set, don't notify error values in cells during update/insert | |
insertIfMissing | if set, then insert row into table if primary key is missing there. Default = False (only update) | |
onlyRefreshTheseDBSheetLookups | contains cells in DBSheetLookups with lookups that should only be refreshed after DB modification was done. If empty, all lookups are refreshed for that DB Modifier/Sheet | |
preventColResize | flag to prevent automatic resizing of columns | |
primKeysCount | count of primary keys in data-table, starting from the leftmost column | |
tableName | Database Table, where Data is to be stored |