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

發表于:2009-11-18來源:作者:點擊數: 標簽:軟件測試數據庫rationalRATIONALRational
軟件測試 開源 工具 Rational Robot SQA Basic數據庫操作相關命令[3] 關鍵字:SQABasic 數據庫 命令 SQLGetSchema Example This example opens the data source named "SblTest," gets the names in the ODBC data sources, and closes the connection. Sub

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

  關鍵字:SQABasic 數據庫 命令

  SQLGetSchema Example

  This example opens the data source named "SblTest," gets the names in the ODBC data sources, and closes the connection.

  Sub main

  '' Declarations

  Dim outputStr As String

  Dim connection As Long

  Dim prompt As Integer

  Dim datasources(1 To 50) As Variant

  Dim retcode As Variant

  Dim action1 as Integer

  Dim qualifier as String

  prompt = 5

  '' Open the datasource "SblTest"

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

  action1 = 1 '' Get the names of the ODBC datasources

  retcode = SQLGetSchema(connection:=connection,action:=1, qualifier:=qualifier, ref:=datasources())

  '' Close the datasource connection

  retcode = SQLClose(connection)

  End Sub

  SQLOpen 功能函數

  建立一個到在connectStr里指定的ODBC數據源的連接并返回一個連接ID,并將完全的連接字符串賦予outputStr變量。如果連接不可用,返回ODBC錯誤的負數。

  SQLOpen ( connectStr$ [ , outputStr$] [ , prompt%] )

  語法: 參數 解釋

  connectStr$ 指定參數,必須參數。

  outputStr$ 可選

  prompt% 可選。Prompt指定何時驅動對話框出現??蛇x項:

 

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

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