软件测试开源工具Rational Robot SQABasic数据库操作相关命令[1]

发表于:2009-11-18来源:作者:点击数: 标签:软件测试数据库rationalRATIONALRational
软件测试 开源 工具 Rational Robot SQA Basic数据库操作相关命令[1] 软件测试工具 关键字:SQABasic 数据库 命令 SQLClose 功能函数 断开由SQLOpen确定的与ODBC数据源连接。 SQLClose ( connection ) 语法: 参数 解释 connection 由SQLOpen返回的一个长整

        软件测试开源工具Rational Robot SQABasic数据库操作相关命令[1]   软件测试工具

  关键字:SQABasic 数据库 命令

  SQLClose 功能函数

  断开由SQLOpen确定的与ODBC数据源连接。

  SQLClose ( connection& )

  语法: 参数 解释

  connection& 由SQLOpen返回的一个长整型的名称参数。

  注解:

  返回的是一个变量。成功返回0并连接随后关闭或断开。如果连接不正常,返回-1。 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

  

原文转自:http://www.ltesting.net