| ET 开发人员参考 |
| Parameter.SetParam 方法 |
语法
表达式.SetParam(Type, Value)
表达式 一个代表 Parameter 对象的变量。
参数
| 名称 | 必选/可选 | 数据类型 | 说明 |
|---|---|---|---|
| Type | 必选 | XlParameterType | 指定参数类型的 XlParameterType 常量之一。 |
| Value | 必选 | Variant | 指定参数的值,如 Type 参数的描述所示。 |
说明
| XlParameterType 可为以下 XlParameterType 常量之一。 |
| xlConstant。使用 Value 参数指定的值。 |
| xlPrompt。显示提示用户输入值的对话框。Value 参数指定的是对话框中显示的文字。 |
| xlRange。使用区域左上角单元格的值。Value 参数指定的是一个 Range 对象。 |
示例
本示例更改第一张查询表的 SQL 语句。子句“(city=?)”表示此查询为参数查询,本示例将城市值设置为常量“Oakland”。
| 示例代码 |
|---|
|