Dim prompt As integer
Dim retcode as Variant
Dim query as String
Dim outputStr as String
'''' The following will open the datasource SBLTESTW and execute the query
'''' specified by query and return the results in destination
''''
query = "select * from class"
retcode = SQLRequest("DSN=SBLTESTW;UID=DBA;PWD=SQL",query,outputStr,prompt,0,destination())
End Sub
SQLRetrieve 功能函数
在由connection指定的连接上获取待定查询结果并将结果返回到destination()数组里。
SQLRetrieve( connection& , destination() , maxColumns% , maxRows% , columnNames% , rowNumbers% , fetchFirst% )
语法:
参 数 解 释
connection& 长型long
destination() 2维变量数组
maxColumns% 整形,可选参数,用来指定在查询中取回的栏列数目
maxRows% 整形,可选参数,用来指定在查询中取回的行的数目
columnNames% 整形,可选参数,默认为0
rowNumbers% 整形,可选参数,默认为0
fetchFirst% 整形,可选参数,默认为0
注解:
文章来源于领测软件测试网 https://www.ltesting.net/