軟件測試開(kāi)源工具Rational Robot SQABasic數據庫操作相關(guān)命令[4] 軟件測試工具
關(guān)鍵字:SQABasic 數據庫 命令
SQLRequest功能函數
建立一個(gè)由connectionStr指定數據源的連接,執行包含在query內的SQL語(yǔ)句,返回請求的結果到ref()數組里,并關(guān)閉連接。
SQLRequest( connectionStr$ , query$ , outputStr$ , prompt% , columnNames% , ref() )
語(yǔ)法: 參數 解釋
connectionStr$ 必需項。
query$ 必需項
outputStr$ 包含完整連接字符串。
prompt% Prompt指定何時(shí)驅動(dòng)對話(huà)框出現。一個(gè)整數。(查看SQLOpen).
columnNames% 0或非0的一個(gè)整數。當columnNames為非0,欄列名稱(chēng)作為ref()數組的第一行被返回。如果columnNames缺省,默認值為0。
ref() 必需項,2維變量數組。
注解:
在連接不能被建立、查詢(xún)不能用、或其它錯誤的情況下,返回一個(gè)負數。在請求成功情況下返回正數或受影響的行數。其它SQL語(yǔ)句返回0。
參數是必需的參數。結果為變量。 SQLRequest Example
This example will open the datasource SBLTESTW and execute the query specified by query and return the results in destination
Sub main
'' Declarations
''
Dim destination(1 To 50, 1 To 125) As Variant
Dim prompt As integer
文章來(lái)源于領(lǐng)測軟件測試網(wǎng) http://kjueaiud.com/