ICommenceDatabase Interface |
You cannot get a reference to FormOA.ICommenceConversation from CmcLibNet.
COM clients can reference this interface by using the ProgId CmcLibNet.Database.
VBScript:Dim db : Set db = CreateObject("CmcLibNet.Database") '.. do stuff .. db.Close Set db = Nothing
When used fom a Commence Item Detail Form or Office VBA, be sure to read up on the Close method.
Namespace: Vovin.CmcLibNet.Database
The ICommenceDatabase type exposes the following members.
| Name | Description | |
|---|---|---|
| Delim |
Delimiter used in DDE requests.
Use this only if the default delimiter does not suffice.
This should be very rare.
Supply up to 8 characters.
| |
| Delim2 |
Secondary delimiter used in DDE requests that act on connections.
Use this only if the default delimiter does not suffice.
This should be very rare.
Supply up to 8 characters.
| |
| EncodeDDEArguments |
Make assembly try to string-escape DDE arguments. Default is true.
| |
| Name |
Name of currently open Commence database.
| |
| Path |
Path of currently open Commence database.
|
| Name | Description | |
|---|---|---|
| AddItem |
Adds the indicated Item to the Category. Fields other than the Name field are set to their default values. (Default values for date fields must not specify date ranges, e.g., "every day"). By default, the new item is local (i.e., non-shared)
CAUTION: If the Category has mandatory fields, those fields must be filled in with subsequent EditItem commands. Use the GetFieldDefinition request to determine which fields are mandatory. Unpredictable results may follow if mandatory fields are left unfilled.
Note: If a clarify field is defined for the category (but is not a Sequence Number field), the clarify field value can be specified using the optional third parameter, Clarify Value. Alternatively, the Item parameter can be a clarified item name.
If the clarify field is a Sequence Number field, then the field value is determined automatically by Commence. An error results if the AddItem REQUEST tries to set a Sequence Number field. Use GetFieldDefinition to determine the Sequence Number field value so a clarified item name can be used with subsequent EditItems.
| |
| AddSharedItem |
Identical in function to AddItem except that it creates a shared item, provided that the database is connected and the category is shared. Otherwise a local item is created.
CAUTION: If the Category has mandatory fields, those fields must be filled in with subsequent EditItem commands. Use the GetFieldDefinition request to determine which fields are mandatory. Unpredictable results may follow if mandatory fields are left unfilled.
| |
| AppendText |
Appends text to an existing text Field. Use this command to overcome the 256 character maximum string limitation of certain macro languages (such as WordBasic). Whenever possible, use a clarified item name.
You are strongly advised to use a ICommenceEditRowSet for editing fields instead.
When an item was just created with AddItem(String, String, String) or AddSharedItem(String, String, String), this is the item that will be used for appending. Otherwise, unless you specifically mark an item (using GetMarkItem(String, String, String) or MarkActiveItem(String)) the first match will be used. | |
| AssignConnection |
Assigns a connection between two items.
| |
| CheckInFormScript |
Updates the detail form script with the text in the specified Filename.
| |
| CheckOutFormScript |
Saves the detail form script to file.
| |
| ClarifyItemNames |
Specifies whether Commence should return clarified item names, or leave bStatus empty to get the current status.
| |
| Close |
Close any references to Commence. The object should be disposed after this.
| |
| DeleteItem |
Deletes the indicated Item from the Category. This action cannot be undone. Whenever possible, use a clarified item name.
| |
| DeleteView |
Deletes the specified view. Use with caution! This action cannot be undone.
| |
| Dispose | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. (Inherited from IDisposable.) | |
| EditItem |
Sets the value of Field to Value for the item identified by Item in Category.
Field must not specify a Calculation field.
Date fields may not specify a range, (e.g., "every day").
Whenever possible, use a clarified Item name.
| |
| ExportDatabaseSchema |
Exports the schema information to file. Defaults to Json.
| |
| FieldValueExists |
Checks to see if value is already present for given field.
| |
| FireTrigger |
Fires the indicated Agent Trigger.
| |
| GetActiveCategory |
Gets the category of the active item or view.
| |
| GetActiveItemName |
Gets the itemname of the active item. Use MarkActiveItem(String) to try and get a clariefied itemname.
| |
| GetActiveViewInfo |
Returms information on the currently active view (if any).
| |
| GetCallerID(String, String) |
Returns a list of all items in the Category having the given phone number in a phone field.
If Category is blank, searches all categories in the currently active database
| |
| GetCallerID(String, String, String) |
Returns a list of all items in the Category having the given phone number in a phone field.
If Category is blank, searches all categories in the currently active database
| |
| GetCategoryCount |
Returns number of categories in the Commence database.
| |
| GetCategoryDefinition |
Returns information on the definition of the specified category.
| |
| GetCategoryNames |
Gets a list of categories in the current Commence database.
| |
| GetCategoryNames(String) |
Gets a list of category names.
| |
| GetClarifiedItemName |
Construct a clarified item name from the unclarified itemname, the clarify separator and the clarify value
| |
| GetClarifyField |
Gets the clarifyfield for the specified category.
| |
| GetClarifySeparator |
Gets the clarify separator for the specified category.
| |
| GetConnectedItemCount |
Gets the number of connected items in connected category for the specified item
| |
| GetConnectedItemField |
Returns the indirect field value(s) in connCategory that itemName of the categoryName is connected to via Connection.
The order of the items in the list is arbitrary (i.e., not sorted).
| |
| GetConnectedItemNames(String, String, String, String) |
Gets a list of items connected to the specified item.
| |
| GetConnectedItemNames(String, String, String, String, String) |
Returns the list of items in category that named item is connected to. The order of the items in the list is arbitrary (i.e., not sorted).
| |
| GetConnectionCount |
Gets the number of connections from the specified category.
| |
| GetConnectionNames(String) |
Gets a list of connection names to the specified category.
| |
| GetConnectionNames(String, String, String) |
Gets the connection names for the specified category.
| |
| GetCursor |
Create a cursor.
| |
| GetDatabase | Obsolete. | |
| GetDatabaseDefinition |
Queries Commence for information on the database definition.
| |
| GetDatabaseSchema |
Gets a serializable object containnig the Commence schema definition.
| |
| GetDesktopCount |
Gets the number of Desktops in the Commence database.
| |
| GetDesktopNames |
Get a list of desktopnames.
| |
| GetDesktopNames(String) |
Gets the desktop names in the Commence database.
| |
| GetField |
Returns a fieldvalue from the specified Commence item.
| |
| GetFieldCount |
Gets the number of fields in the specified category.
| |
| GetFieldDefinition |
Queries Commence for information on the specified field definition.
| |
| GetFieldNames(String) |
Gets a list of fieldnames for the specified Commence category.
| |
| GetFieldNames(String, String) |
Gets the fieldnames for the specified category.
| |
| GetFields(String, String, ListString) |
Gets values of specified field(s) from specified item.
| |
| GetFields(String, String, Object, String) |
Gets values of specified field(s) from specified item.
| |
| GetFieldToFile |
Writes a single fieldvalue to file.
| |
| GetFormCount |
Gets the number of Item Detail Forms for the specified category.
| |
| GetFormNames(String) |
Gets a list of all Item Detail Form names in specified category.
| |
| GetFormNames(String, String) |
Gets the Item detail Form names for the specified category
| |
| GetImageFieldCount |
Gets the number of image fields in specified category.
| |
| GetImageFieldNames(String) |
Gets a list of all field of type 'image' from the specified category.
| |
| GetImageFieldNames(String, String) |
Gets the image-type field names for the specified category.
| |
| GetImageFieldToFile |
Copies the image field identified by the named Category, Item, and Field to the specified Filename.
Only bitmap (.BMP) format image fields are currently supported.
Filename must be a fully qualified path including the drive letter (e.g. c:\tmp\data.bmp).
If the file does not exist, Commence will create it; the drive and directory, however, must already exist.
If the file exists, it will be overwritten. It is the client’s responsibility to perform the necessary file cleanup.
If the image field is blank, no file is written.
| |
| GetItemCount |
Gets the number of items in the specified category.
| |
| GetItemNames(String) |
Gets a list of all itemnames in the specified category.
| |
| GetItemNames(String, String) |
Gets the item names for the specified category
| |
| GetLastError |
Gets the last error that occurred during DDE conversation.
Inspect this value if a call failed.
| |
| GetLetterViewInfo |
Returns information about the active view and selected letter template at the time the Tools-Send Letter or Customize-Database-Letter Template command was executed.
This call is used by the Commence letter macros and has not been implemented here.
| |
| GetMarkItem |
"Marks" the specified item and makes it the default category and item for subsequent calls to:
EditItem, DeleteItem, AppendText, AssignConnection, UnassignConnection, PromoteItemToShared and ShowItem EXECUTE commands, and GetField, GetFieldToFile, GetFields, GetConnectedItemCount and GetConnectedItemNames REQUESTS.
The category and item is marked only for the specific DDE conversation, not globally. that is, each DDE conversation can have a different marked item.
Can be used to mark the (-Me-) item if one is defined.
Syntax: [GetMarkItem("(-Me-)")]
Note: If a Clarify Field is defined for the category, the value of the clarify field can be specified with an optional third paramter. Alternatively, the ItemName can be a clarified item name.
| |
| GetMeField |
Gets a fieldvalue from the item defined as (-Me-) item in Commence.
| |
| GetNameField |
Get the name of the namefield for the specified category.
| |
| GetPhoneNumber |
TAPI must be configured for GetPhoneNumber to work properly.
TAPI is ancient, so this method is not implemented.
| |
| GetPreference |
Get preference settings.
| |
| GetReverseName |
Uses Commence preference information and reverses the name if appropriate.
| |
| GetTriggerCount |
Gets the number of DDE agent triggers defined in the database.
| |
| GetTriggerNames |
Get a list of Agent triggers.
| |
| GetTriggerNames(String) |
Gets the trigger names defined in the database.
| |
| GetViewColumnNames |
Gets the columnnames from a view provided a cursor can be created on them.
| |
| GetViewCount |
Gets the number of views in the specified category.
| |
| GetViewDefinition |
Get definition of a view
| |
| GetViewNames(String) |
Gets a list of all views for the specified category. Returns all categories if category is not specified.
| |
| GetViewNames(String, String) |
Gets a list of view names for the specified category.
| |
| GetViewToFile |
Saves the Commence View to a file in HTML format (similar to the File-Save As HTML menu command).
If the file does not exist, Commence will create it; the drive and directory must exist.
If the file exists, it will be overwritten.
| |
| HasDuplicates |
Checks if field contains duplicate values.
| |
| LogPhoneCall |
Launches an add tem detail window for an item in the Phone Log category (as specified in the Commence Customize-Preferences-Event Logs dialog box). One or more Category/Item pairs may be given as arguments; connections will be set between the new Phone Log item and these items. If no connection exists between the two categories, the pair is ignored and no error is given. The connection is set via all connections found between the two categories.
If no Phone Log category is set, NACK error code 104 (DDE_ERROR_NOLOGCLASS) is returned. If there is no room to add an item in the Phone Log category, NACK error code 112 (DDE_ERROR_FULL) is returned.
| |
| MarkActiveItem |
Marks the active item for subsequent requests.
| |
| MergeTemplateCreate |
Creates a new template with the given parameters. If template exists, the call fails.
This call returns the template filename assigned by Commence, including the full path and extension configured in Preferences-Letter dialog.
| |
| MergeTemplateSave |
Updates an existing template identified by the name parameter. Template must exist, else the call fails.
| |
| PromoteItemToShared |
Promotes a local item to shared status, provided the database is connected and the category is shared. If the item is already shared, its status is unchanged. Note that there is no way to demote an item from shared to local status.
Whenever possible, use a clarified Item name.
| |
| ShowDesktop |
Opens the specified desktop in Commence.
| |
| ShowItem |
Opens an item detail window in Commence for the given Item in the given Category.
If a detail is already open for the item, it will be brought to the top and given the focus.
| |
| ShowView |
Opens the specified view in Commence.
If the view is already open, it will become the active view.
| |
| UnassignConnection |
Unassigns a connection between two items.
| |
| ViewCategory |
Defines the category to be used.
This must be the first message sent to Commence for a ViewData conversation.
ViewCategory may be sent at any time to reset the ViewData conversation state.
ViewData conversation topic has been obsolete since Commence 3.0 (1995 or so),
so it is extremely unlikely you will ever need this method.
| |
| ViewConjunction |
Defines the logical operations that link the filter clauses specified with the ViewFilter request.
Each parameter can be either "And" or "Or"; the default value is "And". AndOr12 defines the relationship between the filter clauses 1 and 2, AndOr34 for clauses 3 and 4, and AndOr13 for (1 and 2) and (3 and 4), etc. Note the special significance of AndOr48, which signifies the relationship between the two groups of 4 filters.
The logical precedence is: (Filter1 AndOr12 Filter2) AndOr13 (Filter3 AndOr34 Filter4) AndOr4to8 [repeat 5 to 8] | |
| ViewConnectedCount |
Returns the number of items in the connCategory that the Indexth item is connected to via ConnectionName.
| |
| ViewConnectedField |
Returns the value of Field of the ConnIndexth item in the connCategory that is connected to the Indexth item via ConnectionName. Use the ViewConnectedCount REQUEST to determine the maximum ConnIndex value. The string "(deleted)" will be returned if the requested item is deleted after the ViewData snapshot is taken.
| |
| ViewConnectedFields(Int32, String, String, Int32, ListString, String) |
Returns multiple field values (Field_1 through Field_n) in the ConnIndexth item in the connCategory that is connected to the Indexth item via ConnectionName. Use the ViewConnectedCount REQUEST to determine the maximum ConnIndex value. The string "(deleted)" will be returned if the requested item is deleted after the ViewData snapshot is taken.
Field cannot be of the fieldtype Image.
| |
| ViewConnectedFields(Int32, String, String, Int32, Object, String) |
Returns multiple field values (Field_1 through Field_n) in the ConnIndexth item in the connCategory that is connected to the Indexth item via ConnectionName. Use the ViewConnectedCount REQUEST to determine the maximum ConnIndex value. The string "(deleted)" will be returned if the requested item is deleted after the ViewData snapshot is taken.
Field cannot be of the fieldtype Image.
| |
| ViewConnectedItem |
Returns the ConnIndexth item in connCategory that the Indexth item is connected to via ConnectionName. Use the ViewConnectedCount REQUEST to determine the maximum ConnIndex value.
| |
| ViewDeleteAllItems |
USE WITH EXTREME CAUTION!
Deletes all items that satisfy the currently defined filter.
If no filter is defined, deletes all items in the previously named category, see ViewCategory(String).
Fails without warning when no delete permissions were granted on the category.
| |
| ViewField |
Returns the value of Field of the Indexth item that satisfies the currently defined filter (if any).
Use the ViewItemCount REQUEST to determine the maximum Index value.
The string "(deleted)" will be returned if the requested item is deleted after the ViewData snapshot is taken.
| |
| ViewFields(Int32, ListString, String) |
Returns multiple field values (n) for the Indexth item that satisfies the currently defined filter (if any). Use the ViewItemCount request to determine that maximum Index value. Use the GetFieldNames request to determine valid field names.
The string "(deleted)" will be returned if the requested item is deleted after the ViewData snapshot is taken. Image type fields are not allowed in the Field_ parameters.
| |
| ViewFields(Int32, Object, String) |
Returns multiple field values (n) for the Indexth item that satisfies the currently defined filter (if any). Use the ViewItemCount request to determine that maximum Index value. Use the GetFieldNames request to determine valid field names.
The string "(deleted)" will be returned if the requested item is deleted after the ViewData snapshot is taken. Image type fields are not allowed in the Field_ parameters.
| |
| ViewFieldToFile |
Saves specified field to file
| |
| ViewFilter |
Defines the criteria for the multiple filter to be applied against the previously named category/view (see ViewCategory/ViewView).
This is by far the most complicated API method to use. Unless you are actually creating views from code,
you are strongly advised to use the Filters collection of the CommenceCursor class instead.
| |
| ViewImageFieldToFile |
Copies the image field data in Field from the Indexth item that satisfies the currently defined filter (if any) to the specified Filename.
| |
| ViewItemCount |
Returns the number of items that satisfy the currently defined filter (if any).
If no filter is defined, this request returns the total number of items in the category
| |
| ViewItemIndex |
Returns the index of the item with the indicated name field value. The item must also satisfy the currently defined filter (if any). Use a clarified itemname if possible.
Note: If the NameFieldValue is left blank, the marked item will be used. Returns the index of the marked item (if any).
| |
| ViewItemName |
Returns the itemname for the Indexth item.
Different from ViewField(Index, Name) in that a clarified item name may be returned. The ClarifyItemNames request is used to enable or disable the use of clarified item names.
| |
| ViewMarkItem |
Marks the Indexth item in the view and makes it the default category and item for the EditItem, AppendText, AssignConnection, UnassignConnection, PromoteItemToShared and ShowItem EXECUTE commands.
| |
| ViewReverseName |
Uses Commence preference information and reverses the name if appropriate.
| |
| ViewSaveView |
Saves the virtual DDE view already created with the ViewCategory, ViewFilter, ViewSort, etc., as an actual view in Commence, accessible via the normal user interface. The view will be saved using the specified New View Name.
If the view already exists, it will be overwritten. Use GetViewNames to determine if the view name conflicts with an existing view.
| |
| ViewSort |
Defines the sort criteria for the view. Field1, Field2, Field3, and Field4 define the fields to sort by. Sort1, Sort2, Sort3, and Sort4 define the sort type and should be "Ascending" or "Descending". Unused sort pairs (i.e. FieldN, SortN) may be omitted.
| |
| ViewView |
Uses the category and filter criteria of a Commence View that has already be defined from the Commence menu interface.
The ViewView REQUEST overrides any previously received ViewCategory, ViewConjunction, ViewFilter, and ViewSort REQUESTS.
If the ViewName parameter is left blank, the active view will be used.
|