
## DataRecordSet class

Stores, formats, refreshes, and exposes data queried from a database in Microsoft Visio.

## Constructors

| Name | Description |
| --- | --- |
| [DataRecordSet](#constructor) | Constructor. |

## Properties

| Name | Type | Description |
| --- | --- | --- |
| [ID](#id) | long | The data recordset ID, unique within the document. |
| [ConnectionID](#connectionid) | long | The connection ID for the associated DataConnection object. Does not exist for XML data sources. |
| [Command](#command) | String | The command string used to query data from the data source. |
| [Options](#options) | int | Options to apply to the data recordset. Possible values can be any combination of one or more of those shown in the foll |
| [TimeRefreshed](#timerefreshed) | DateTime | The date and time the data recordset was last refreshed. |
| [NextRowID](#nextrowid) | long | The next available Visio row ID. |
| [Name](#name) | String | The display (or "friendly") name of the data recordset. |
| [RowOrder](#roworder) | int | Whether to use the order of the rows in the data recordset as the primary key. True (1) if row IDs are determined by row |
| [RefreshOverwriteAll](#refreshoverwriteall) | int | Whether to overwrite user changes to shape data items in shapes linked to data when the data recordset is refreshed. The |
| [RefreshNoReconciliationUI](#refreshnoreconciliationui) | int | Whether the data-reconciliation user interface should be disabled. True (1) to disable the user interface (UI). False (0 |
| [RefreshInterval](#refreshinterval) | long | How often (in minutes) Visio refreshes the data recordset automatically. This value must be 1 or larger. |
| [ReplaceLinks](#replacelinks) | int | Defines how shape-data links are treated when shapes are copied or cut. 1 to replace existing links in the target shape. |
| [Checksum](#checksum) | long | A checksum value, generated by Visio, and based on data-recordset properties. Set this attribute to 0; Visio recalculate |
| [ADOData](#adodata) | String | Contains XML that conforms to the ADO classic XML schema for an ADO recordset and that describes the data in the data re |
| [PrimaryKeys](#primarykeys) | StringCollection | Identifies one or more primary-key columns in the data recordset. |
| [RefreshConflicts](#refreshconflicts) | RowCollection | Indicates a row in the data recordset linked to a shape that is in conflict after the data recordset is refreshed. RowID |
| [RowMaps](#rowmaps) | RowCollection | Maps a data-recordset row to a shape. RowID - Row ID of the row, unique within the data recordset. ShapeID - Shape ID of |
| [AutoLinkComparison](#autolinkcomparison) | AutoLinkComparison | Defines a rule that compares a column in the parent DataRecordset element with a shape data item from the last successfu |
| [DataColumns](#datacolumns) | DataColumnCollection | Contains all the DataColumn elements in a data recordset. |

### DataRecordSet() {#constructor}

Constructor.

### DataRecordSet.ID property {#id}

The data recordset ID, unique within the document.

**Type:** long

### DataRecordSet.ConnectionID property {#connectionid}

The connection ID for the associated DataConnection object. Does not exist for XML data sources.

**Type:** long

### DataRecordSet.Command property {#command}

The command string used to query data from the data source.

**Type:** String

### DataRecordSet.Options property {#options}

Options to apply to the data recordset. Possible values can be any combination of one or more of those shown in the following table. The value of the property is OptionsValue integer constant.

**Type:** int

### DataRecordSet.TimeRefreshed property {#timerefreshed}

The date and time the data recordset was last refreshed.

**Type:** DateTime

### DataRecordSet.NextRowID property {#nextrowid}

The next available Visio row ID.

**Type:** long

### DataRecordSet.Name property {#name}

The display (or "friendly") name of the data recordset.

**Type:** String

### DataRecordSet.RowOrder property {#roworder}

Whether to use the order of the rows in the data recordset as the primary key. True (1) if row IDs are determined by row order. False (0) if row IDs are determined by values in the primary key column(s) of the data recordset. The value of the property is BOOL integer constant.

**Type:** int

### DataRecordSet.RefreshOverwriteAll property {#refreshoverwriteall}

Whether to overwrite user changes to shape data items in shapes linked to data when the data recordset is refreshed. The value of the property is BOOL integer constant.

**Type:** int

### DataRecordSet.RefreshNoReconciliationUI property {#refreshnoreconciliationui}

Whether the data-reconciliation user interface should be disabled. True (1) to disable the user interface (UI). False (0) to enable the UI. The value of the property is BOOL integer constant.

**Type:** int

### DataRecordSet.RefreshInterval property {#refreshinterval}

How often (in minutes) Visio refreshes the data recordset automatically. This value must be 1 or larger.

**Type:** long

### DataRecordSet.ReplaceLinks property {#replacelinks}

Defines how shape-data links are treated when shapes are copied or cut. 1 to replace existing links in the target shape. 0 to maintain existing links in the target shape. If this attribute is absent, Visio asks the user whether to replace links on copy or cut.

**Type:** int

### DataRecordSet.Checksum property {#checksum}

A checksum value, generated by Visio, and based on data-recordset properties. Set this attribute to 0; Visio recalculates this value at runtime.

**Type:** long

### DataRecordSet.ADOData property {#adodata}

Contains XML that conforms to the ADO classic XML schema for an ADO recordset and that describes the data in the data recordset.

**Type:** String

### DataRecordSet.PrimaryKeys property {#primarykeys}

Identifies one or more primary-key columns in the data recordset.

**Type:** StringCollection

### DataRecordSet.RefreshConflicts property {#refreshconflicts}

Indicates a row in the data recordset linked to a shape that is in conflict after the data recordset is refreshed. RowID - Indicates a row in the data recordset linked to a shape that is in conflict after the data recordset is refreshed. ShapeID - Shape ID of the shape involved in the conflict. PageID - Page ID of the shape involved in the conflict.

**Type:** RowCollection

### DataRecordSet.RowMaps property {#rowmaps}

Maps a data-recordset row to a shape. RowID - Row ID of the row, unique within the data recordset. ShapeID - Shape ID of the shape linked to data in the data-recordset row identified by RowID. PageID - Page ID of the shape linked to data in the data-recordset row identified by RowID.

**Type:** RowCollection

### DataRecordSet.AutoLinkComparison property {#autolinkcomparison}

Defines a rule that compares a column in the parent DataRecordset element with a shape data item from the last successful automatic linking action performed in the user interface.

**Type:** AutoLinkComparison

### DataRecordSet.DataColumns property {#datacolumns}

Contains all the DataColumn elements in a data recordset.

**Type:** DataColumnCollection
