SQLCURSOR

此帮助页面适用于 Studio。 此信息也适用于 Desktop Studio。

Icon of SQLCursor: gray database with code brackets

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

依赖关系

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

支持的脚本类型

其中一条分支线通向其他三个正方形的正方形。

Icon of gray-green envelope

深绿色对话气泡图标

Icon of purple telephone handset

Icon of rust-colored voicemail symbol of two circles joined by a line

Icon of pink document with lines of text

绿色手机图标,屏幕上有一个语音气泡

通用

Email 聊天 电话 語音邮件 工作项目 短信

输入属性

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

属性

说明

添加说明文字

输入在脚本中唯一标识此操作的短语。 标题显示在脚本画布上的操作图标下方。

SQL 查询

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

全局变量

未使用。
发布

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

超时秒数

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

结果分支条件

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

条件

说明

默认

Path taken unless the script meets a condition that requires it to take one of the other branches. It is also taken if the action's other branches are not defined.
NoRecords Path taken if there are no values for the specified properties.
错误 Path taken when the action fails to execute properly. For example, when there is an unexpected problem such as poor connectivity, syntax errors, and so on. The _ERR variable, with a single underscore character, should be populated with a condensed explanation of the problem.