2.2.10.3 Recordset Refresh

A recordset refresh is the operation of replacing the contents of a recordset with data queried from a data source. Refresh information is specified by the recordset and its associated data connection.

The refresh query is specified by the Command attribute of the DataRecordSet_Type element for the recordset. If the Command attribute of the DataRecordSet_Type element is empty, the refresh query is specified by the Command attribute of the DataConnection_Type element for the data connection.

Only recordsets that are enabled for data refresh participate in refresh operations. A recordset is enabled for data refresh when both of the following conditions are true:

  • A PublishSettings_Type child element of the VisioDocument_Type element for the web drawing is missing, or the PublishSettings_Type element contains a RefreshableData_Type child element with an ID attribute equal to the ID attribute of the DataRecordSet_Type element for the recordset.

  • The DataRecordSet_Type element for the recordset contains an Options attribute with a value that is not a bitwise OR combination of the value one.

When the data in the rows of a recordset change, shape data in shapes with data bindings to the recordset are also updated. The RefreshOverwriteAll attribute of the DataRecordSet_Type element for the recordset determines which shape data items are updated. Individual shape data items are then updated in the following manner:

  • If the cell associated with the shape data item contains a formula expression containing a Guard function token, the shape data item is not updated.

  • If the cell associated with the shape data item contains a formula expression containing a SetAtRef function token, the value of the cell referenced by the first argument of the function is updated with the value of the recordset for the mapped field and row.

  • Otherwise, the value of the shape data item is updated with the value of the recordset for the mapped field and row. This could involve a data type conversion from the data type of the field, as specified by the DataType attribute of its corresponding DataColumn_Type element, to the data type of the shape data item.

All formulas in cells that have been updated are recalculated as part of a diagram update.