Class DBMapper
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
Inherited Members
Namespace: DBaddin
Assembly: DBaddin.dll
Syntax
public class DBMapper : DBModif
Constructors
| Improve this Doc View SourceDBMapper(CustomXMLNode, Range)
normal constructor with definition XML
Declaration
public DBMapper(CustomXMLNode definitionXML, Range paramTarget)
Parameters
Name | Description |
---|---|
definitionXML | |
paramTarget |
DBMapper(String, String, Range)
legacy constructor for mapping existing DBMapper macro calls (copy in clipboard)
Declaration
public DBMapper(string defkey, string paramDefs, Range paramTarget)
Parameters
Name | Description |
---|---|
defkey | |
paramDefs | |
paramTarget |
Fields
| Improve this Doc View SourceCUDFlags
respect C/U/D Flags (DBSheet functionality)
Declaration
public bool CUDFlags
Field Value
Description |
---|
Methods
| Improve this Doc View SourceaddHiddenFeatureDefs(CustomXMLNode)
to re-add hidden features only available in XML
Declaration
public override void addHiddenFeatureDefs(CustomXMLNode definitionXML)
Parameters
Name | Description |
---|---|
definitionXML | the definition node of the DB Modifier where the hidden features should be added |
Overrides
| Improve this Doc View SourceDBModifSaveNeeded()
checks whether DBModifier needs saving, either because execOnSave is set or in case of CUD DBMappers if any i/u/d Flags are present
Declaration
public override bool DBModifSaveNeeded()
Returns
Description |
---|
true if save needed |
Overrides
| Improve this Doc View SourcedoDBModif(Boolean, String, Boolean)
execute the modifications for the DB Mapper by storing the data modifications in the DBMapper range to the database
Declaration
public override void doDBModif(bool WbIsSaving = false, string calledByDBSeq = "", bool TransactionOpen = false)
Parameters
Name | Description |
---|---|
WbIsSaving | flag for being called during Workbook saving |
calledByDBSeq | the name of the DB Sequence that called the DBMapper |
TransactionOpen | flag whether a transaction is open during the DB Sequence |
Overrides
| Improve this Doc View SourceextendDataRange()
extend DataRange to "whole" DBMApper area (first row (header/field names) to the right and first column (first primary key) down)
Declaration
public void extendDataRange()
hadChanges()
Declaration
public bool hadChanges()
Returns
Description |
---|
insertCUDMarks(Range, Boolean)
inserts CUD (Create/Update/Delete) Marks at the right end of the DBMapper range
Declaration
public void insertCUDMarks(Range changedRange, bool deleteFlag = false)
Parameters
Name | Description |
---|---|
changedRange | passed TargetRange by Change Event or delete button |
deleteFlag | if delete button was pressed, this is true |
resetCUDFlags()
reset CUD FLags, either after completion of doDBModif or on request (refresh)
Declaration
public void resetCUDFlags()
setDBModifCreateFields(ref DBModifCreate)
set the fields in the DB Modifier Create Dialog with attributes of object
Declaration
public override void setDBModifCreateFields(ref DBModifCreate theDBModifCreateDlg)
Parameters
Name | Description |
---|---|
theDBModifCreateDlg |