|
请帮我分析一下下面的代码,不是很明白!!!
Sub main
' Declarations
'
Dim outputStr As String '请问这里定义的变量是干什么啊?
Dim connection As Long
Dim prompt As Integer '请问这里的prompt是什么意思?
Dim datasources(1 To 6,1 to 9) As Variant '这又指什么呢?
Dim retcode As Variant '这是干嘛的?
Dim iProcColumns As Integer
Dim iProcRows As Integer
Dim iProcRowCount As Integer
Dim iProcColumnCount As Integer
Dim sFunctionCall As String
prompt = 2 ’为什么是2?什么意思?
connection = SQLOpen("DSN=RationalTest", outputStr, prompt:=2)
retcode = SQLExecQuery(connection:=connection,query:="select * from product ")
retcode = SQLRetrieve(connection,datasources())
For iProcRowCount = 1 to 10
.
For iProcColumnCount = 1 to 6
sFunctionCall = datasources(iProcRowCount, iProcColumnCount)
Next iProcColumnCount
Next iProcRowCount
retcode = SQLClose(connection)
End Sub |
|