Description

A collection of McDataSource instances and McDataSourceCommand.

Object Model

Remarks

A McDataSources registers commands or verbs stored in McDataSourceCommand instances that may be executed on objects. These registered commands are grouped by a McDataSource which specifies how to gain access to the implementation. Base commands function exist that define intrinsic behaviour such as Open, Store, Export and data access as well as a mechanism to add specialized commands and multiple command variations. These commands may be registered and executed on content of type McDBNode, COM Object, File and Clipboard/DataObject. A Sub-Type or 'ContentType' also exist to further identify the type on object. The McType.Name, ProgID, extension and clipboard-format are used to qualify content types of respective McDBNode, COM Object, File and Clipboard/DataObject objects. Normally the McDataSource identifies an object that contains a single McDataHandler. The McDataHandler is a standardized interface that instructs the source object how and which command to execute. Provides a standardized interface to expose popular commands for different object types promoting interaction between object types and decreasing the need for programmers to learn many different custom interfaces. Normally the McDataSource will create the McDataHandler object when needed from a persisted ProgID or macro project and class name when needed. A non-persistent McDataSource is another option where a opened McDataHandler instance is registered with the McDataSource. In this case the McDataSource does not own the McDataHandler and will keep the reference until it is instructed to release it or is released itself. A McDataSource may also register fully qualified VBA macro procedures. When needed the Macro Project will be loaded and the single macro executed. The macros of a McDataSource may reside various basic modules of various projects and the McDataHandler is not needed or required. These macros procedures may be created to support the macro command which registers a VBA macro subroutine to a name. Also individual methods of the McDataHandler interface may be registered to a single macro procedure without supporting the whole interface.
Features provided:
* Enumeration of DLL and Macro McDataHandler servers,
* Enumeration of commands supported by a McDataHandler,
* Find a server for a particular command,
* Retrieve a localized caption for a particular command,
* Enumerate the various implementations available for a particular command.

PROGID McAddInData.McDataSources
ObjectFlags Creatable

Members

Methods
Create Creates a McDataSource for a Data Object Programmatic Identifier (ProgID).
FindCommandsByExample Returns a collection of McDataSourceCommand instances from a template McDataSourceCommands instance.
FindCommandsByQuery Returns a collection of McDataSourceCommand instances from a query on the Commands property.
GetHandler Returns a McDataHandler for the given command properties.
GetObjectIDKey Returns the Content value for a particular COM object instance.
Register Requests a SourceHandler to Register itself to a DataSource and configure its DBType.
Remove A given McDataSource is removed from all McDataSource's Collections.

Properties
ApplicationRead-only property The Root of the Application Object Model.
CommandFieldNamesRead-only property Returns an array (0 based) of string values specifying the field names to be used in FindCommandsByQuery and GetRecordset.
CommandsRead-only property Returns a collection of all McDataSourceCommand instances.
CountRead-only property Returns the number of McDataSource instances known to this object.
ItemRead-only property The McDataSource for zero based index (numeric vartypes) or a McDataSource::ProgIDOrModuleName.
ParentRead-only property The Object that created this instance.