DataRecordset.RemoveRefreshConflict Method
Visio Automation Reference |
Clears information about a conflict for a data-linked shape from the current document.
Note |
---|
This Visio object or member is available only to licensed users of Microsoft Office Visio Professional 2007. |
Version Information
Version Added: Visio 2007
Syntax
expression.RemoveRefreshConflict(ShapeInConflict)
expression An expression that returns a DataRecordset object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
ShapeInConflict | Required | [IVSHAPE] | A shape linked to data that has a conflict after the data recordset is refreshed. |
Return Value
Nothing
Remarks
If ShapeInConflict actually has no conflicts, the method will have no effect.
If you choose not to remove information about a conflict, that information will be persisted in the current document indefinitely.
Example
This Microsoft Visual Basic for Applications (VBA) macro shows how to use the RemoveRefreshConflict method to remove conflicts. It calls the GetAllRefreshConflicts method to determine which shapes, if any, have conflicts after a data recordset is refreshed. Then it calls the GetMatchingRowsForRefreshConflict method to determine which data recordset row or rows is causing the conflict.
It refreshes the data recordset most recently added and if it finds no resulting conflicts, prints "No conflicts" in the Immediate window. If it does find conflicts, it passes each of the shapes that have conflicts to the GetMatchingRowsForRefreshConflict method and prints the resulting row IDs in the same window. Then it passes the shapes that have conflicts to the RemoveRefreshConflict method to remove the conflicts.
Before running this macro, make sure that the most recently added data recordset is a connected (non-XML-based) data recordset and that the connection to the original data source is still available. Then delete a row in the data source or make another change that will cause a conflict when you refresh the data recordset.
Visual Basic for Applications |
---|
|
See Also