軟件測試開源工具Rational Robot SQABasic數據庫操作相關命令[5]

發表于:2009-11-19來源:作者:點擊數: 標簽:軟件測試數據庫rationalRATIONALRational
軟件測試 開源 工具 Rational Robot SQA Basic數據庫操作相關命令[5] 軟件測試工具 關鍵字:SQABasic 數據庫 命令 語法: 參數 解釋 connection 必需項,long destination$ 必需項,包含用來存儲結果的文件和路徑的字符串。 columnNames% 整型,非0時,文件

      軟件測試開源工具Rational Robot SQABasic數據庫操作相關命令[5]  軟件測試工具

  關鍵字:SQABasic 數據庫 命令

  語法: 參數 解釋

  connection& 必需項,long

  destination$ 必需項,包含用來存儲結果的文件和路徑的字符串。

  columnNames% 整型,非0時,文件首行將存儲數據庫計劃指定的欄列名稱。如果缺省,默認為0。

  columnDelimiter$ 每行內界定域用的字符串。如果缺省,tab鍵用來分隔域。

  注解:

  成功完成操作情況下,返回值是結果集的行數目。如果函數不能在指定連接上獲得結果,返回-1。

  參數是必需參數。返回變量。 SQLRetrieveToFile Example

  This example opens a connection to a data source and retrieves information to a file.

  Sub main

  '' Declarations

  ''

  Dim connection As Long

  Dim destination As String

  Dim retcode As Long

  Dim query as String

  Dim outputStr as String

  Dim filename as String

  Dim columnDelimiter as String

  ''

  '' Open the connection

  connection = SQLOpen("DSN=SblTest",outputStr,prompt:=3)

  '' Execute the query

  ''

  query = "select * from customer"

  retcode = SQLExecQuery(connection,query)

  '' Place the results of the previous query in the file named by

  '' filename and put the column names in the file as the first row.

  '' The field delimiter is %

  ''

  filename = "c:\myfile.txt"

  columnDelimiter = "%"

  retcode = SQLRetrieveToFile(connection:=connection,destination:=filename, columnNames:=1,columnDelimiter:=columnDelimiter)

  retcode = SQLClose(connection)

  End Sub

原文轉自:http://www.anti-gravitydesign.com

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97