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 pink document with lines of text

Icon of green mobile phone with a speech bubble on its screen

通用

電郵 聊天 電話 語音郵件 工作項目 SMS

輸入屬性

這些屬性定義了動作執行時使用的資料。

屬性

描述

新增標題

Enter a short phrase that uniquely identifies this action in the script. The caption appears on the script canvas under the action icon.

SQLQuery

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.