Muokkaa

Jaa


DataRecordsets object (Visio)

The collection of DataRecordset objects associated with a Document object.

Note

This Visio object or member is available only to licensed users of Visio Professional 2013.

Remarks

The default property of the DataRecordsets collection is Item.

Every Visio Document object has a DataRecordsets collection, which is empty until you import data into Visio. To connect a Visio document to a data source, you add a DataRecordset object to the DataRecordsets collection of the document.

To add a DataRecordset object to the DataRecordsets collection, you can use one of the following three methods, depending on the type of data source that you want to connect to (OLEDB/ODBC or XML) and how you want to pass connection string and query command strings to Visio. By using the:

  • Add method, you can connect to an OLEDB or ODBC data source and pass connection and query command string information to Visio directly as method parameters.

  • AddFromConnectionFile method, you can connect to an OLEBD or ODBC data source by passing the method an Office Data Connection (ODC) file that contains the connection and query command string information that you want to supply to Visio.

  • AddFromXML method, you pass the method an ADO classic XML string that contains all the data that you want to include in the data recordset.

After you have created a data recordset, the connection string and query command string associated with the data recordset are represented by the DataConnection.ConnectionString and DataRecordset.CommandString properties respectively.

Events

Methods

Properties

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.