Sqlcursor

向数据库服务器提交 SQL(结构化查询语言)语句,并返回多行结果。

Dependencies

  • 当需要多行时,使用 Sqlcursor 可实现与 Sqlselect 相同的效果。
  • 此操作不会一次性检索所有行。相反,数据集会被打开并保持打开状态,以供重复访问。
  • Sqlcursor 一样,每一列都存储在一个与该列同名的变量中。最初,脚本将提取第一条记录。要获取连续记录,请重复执行 Sqlnext ,直到 Sqlnext 触发其 End of Dataset 分支条件。
  • 如果脚本不需要继续提取所有记录,请将 Sqlclose 操作放在 End of Dataset 分支条件之后。这将手动关闭数据集。这可以确保数据库内存获得释放,且潜在的记录锁定不会保持活动状态。

Supported Script Types

The icon for a Generic script type - a rectangle with < and > symbols inside it.

The icon for the Email script type - a large @ symbol in a diamond.

The icon for the Chat script type - a chat bubble with an ellipsis inside (...), in a diamond shape.

The icon for the Phone script type - an old-style phone handset with curved lines indicating sound coming out of it.

The icon for the Voicemail script type - a symbol that looks like a cassette tape - two circles sitting on a horizontal line.

The icon for the Work Item script type-a piece of paper with one corner folded down and a bullet list on it.

The icon for the SMS script type - a smart phone with a chat bubble coming out of it.

The icon for the Digital script type - a computer monitor with a smartphone next to it.

通用

电子邮件 聊天 电话 语音信箱 工作项目 短信 数字

Input Properties

这些属性定义操作在执行时使用的数据。

属性

说明

说明文字

输入在脚本中唯一标识此操作的短语。标题显示在脚本画布上的操作图标下方。The default is the action name.

SQLQuery

将提交到数据库服务器的 SQL 语句。预计此语句应当会返回记录。

GlobalVariables

未使用。
Publish

发布来自检索的最后一个名称的变量和值。例如,如果有 3 个检索的名称,则只有来自最后一个名称的数据才会被发布。

TimeoutSec

操作在超时之前等待执行的秒数。该值必须介于 060

Result Branch Conditions

结果分支条件允许您在脚本中创建分支,以在执行操作时处理不同的结果。

条件

说明

Default

除了脚本满足条件要求其接受其他分支的情况之外,所要采用的路径。如果未定义操作的其他分支,也会执行此操作。
NoRecords 指定的属性没有值时所采用的路径。
OnError 操作无法正确执行时所采用的路径。例如,出现连接不良、语法错误等意外问题时。_ERR 变量以单个下划线字符填充,应包含对问题的简要解释。