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.
This Visio object or member is available only to licensed users of Microsoft Visio Professional 2010 or Visio Premium 2010.
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$]".