Table of contents
TOC
折叠目录
展开目录

DataRecordset.CommandString 属性 (Visio)DataRecordset.CommandString Property (Visio)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

获取或设置用于查询数据源创建数据记录集或刷新现有的命令字符串。读/写。Gets or sets the command string used to query the data source to create a data recordset or refresh an existing one. Read/write.

请注意 此 Visio 对象或成员是仅供授权用户的 Visio 专业 2013年。Note This Visio object or member is available only to licensed users of Visio Professional 2013.

语法Syntax

表达式CommandStringexpression . CommandString

表达式_该表达式返回一个数据记录集对象。_expression An expression that returns a DataRecordset object.

返回值Return Value

字符串String

注解Remarks

命令字符串的数据记录集指定数据库表或 Microsoft Excel 工作表和工作表或工作表中包含您要查询的数据的列。刷新数据记录集内的数据时,该命令字符串也将传递到的DataRecordset.Refresh方法。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.

CommandString属性设置为新值已不会影响数据的数据记录集。若要更新使用新的CommandString设置数据记录集内的数据,请调用Refresh方法。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.

CommandString属性不适用于使用AddFromXML方法创建的数据记录集。The CommandString property does not apply to data recordsets created by using the AddFromXML method.

下面的示例命令字符串指示 Visio 可以从 Excel 工作表 sheet1 中检索所有数据: "SELECT * FROM [Sheet1$]"The following sample command string directs Visio to retrieve all data from an Excel worksheet named Sheet1: "SELECT * FROM [Sheet1$]".

© 2018 Microsoft