Export (0) Print
Expand All

DataRecordset.CommandString Property (Visio)

Gets or sets the command string used to query the data source to create a data recordset or refresh an existing one. Read/write.

Note Note

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

Version Added: Visio 2007

expression .CommandString

expression An expression that returns a DataRecordset object.

Return Value

String

The command string of a data recordset specifies the database table or Microsoft Excel worksheet and the columns within the table or worksheet that contain the data you want to query. The command string is also passed to the DataRecordset.Refresh method when the data in the data recordset is refreshed.

Setting the CommandString property to a new value has no effect on data already in the data recordset. To update the data in a data recordset using a new CommandString setting, call the Refresh method.

The CommandString property does not apply to data recordsets created by using the AddFromXML method.

The following sample command string directs Visio to retrieve all data from an Excel worksheet named Sheet1: "SELECT * FROM [Sheet1$]".

Show:
© 2014 Microsoft