DBModifHelper Class

global helper functions for DBModifiers

Inheritance Hierarchy

Namespace: DBaddinAssembly: DBaddin in (DBaddin.dll)

Syntax

public sealed class DBModifHelper

The DBModifHelper type exposes the following members.

Constructors

ClassSummary
private constructorDBModifHelper()

Methods

NameSummary
private methodaddErrorDBModifColl(String)
adds error message to both DBModifDefColl (for display in Ribbon menu) as well as log
public methodcheckAndReturnRange(String)
check one param range input (name) and return the range if successful
public methodCorrectQuotes(String)
correct quotes in field name
public methodcreateDBModif(String, String)
creates a DBModif at the current active cell or edits an existing one defined in targetDefName (after being called in defined range or from ribbon + Ctrl + Shift)
public methodCVErrText(Int32)
to convert the error number to text
public methoddeleteRow()
marks a row in a DBMapper for deletion, used as a ExcelCommand to have a keyboard shortcut
public methodexecuteDBModif(String, Boolean)
execute given DBModifier, used for VBA call by Application.Run
public methodgetDBModifDefinitions(Workbook, Boolean)
gets defined names for DBModifier (DBMapper/DBAction/DBSeqnce) invocation in the passed workbook and updates Ribbon with it
public methodgetDBModifNameFromRange(Range)
gets DB Modification Name (DBMapper or DBAction) from theRange
public methodgetExecutionParam(String)
get given execution parameter or setting parameter found by fetchSetting, used for VBA call by Application.Run
public methodgetRangeFromNameInSheet(ref String, Worksheet)
get the range from a worksheet name in the given sheet
public methodinsertRow()
inserts a row in a DBMapper, used as a ExcelCommand to have a keyboard shortcut
public methodIsXLCVErr(Object)
To check for errors in passed range obj, makes use of the fact that Range.Value never passes Integer Values back except for Errors
public methodopenIdbConnection(Int32, String)
opens a database connection
public methodresizeDBMapperRange(Range, Range)
in case there is a defined DBMapper underlying the DBListFetch/DBSetQuery target area then change the extent of it (oldRange) to the new area given in theRange
public methodsetExecutionParam(String, Object)
set given execution parameter, used for VBA call by Application.Run
public methodTypeToDbType(Type, String, Collection)
cast .NET data type to ADO.NET DbType

Fields

NameDescription
public fieldclosingQuote
closing quote, e.g. ] for SQL Server
public fieldclosingQuoteReplacement
Replacement for closing quote, if needed, e.g. SQL Server requires ] to be replaced by ]]
public fieldDBModifDefColl
DBModif definition collections of DBmodif types (key of top level dictionary) with values being collections of DBModifierNames (key of contained dictionaries) and DBModifiers (value of contained dictionaries))
public fieldFieldParamMap
Mapping of field names to parameter names (Param + number)
public fieldhadError
indicates an error in execution of DBModifiers, used for commit/rollback and for non-interactive message return
public fieldidbcnn
main db connection for DB modifiers
public fieldlistSepLocal
used to work around the fact that when started by Application.Run, Formulas are sometimes returned as local
public fieldopeningQuote
opening quote, e.g. [ for SQL Server
public fieldpreventChangeWhileFetching
avoid entering Application.SheetChange Event handler during listfetch/setquery
public fieldtrans
common transaction, needed for DBSequence and all other DB Modifiers