|
我试验了一下,应该是可以的吧,你看一下我写的例子代码,是不是这个意思:
Sub Main
Dim Result As Integer
Dim connect as long
Dim query as string
Dim out1(1 to 2,1 to 1) as variant
Dim out2(1 to 2,1 to 1) as variant
'这里定义两个二维数组
dim retcode as variant
dim i as integer
'Initially Recorded: 2005-7-18 22:16:12
'Script Name: sqltest
connect = SQLOpen("DSN=te;UID=sa;PWD=")
query = "select bookname,popular from book where authorid = 1 "
call SQLExecquery(connect,query)
call SQLRetrieve(connect,out1())
call SQLRetrieve(connect,out2())
msgbox out1(1,1)
msgbox out1(2,1)
msgbox out2(1,1)
msgbox out2(2,1)
call sqlclose(connect)
End Sub
运行时都可以弹出查询出来的结果 |
|