获取列数据并存储到数组VB6中

时间:2013-10-03 07:19:26

标签: vb6

如何循环列字段并插入数组

 Do While rstRGRPT1.RecordCount
                sCol = rstRGRPT1!FCOL
                'oAList.Add "sCol"
                rstRGRPT1.MoveNext
            Loop

1 个答案:

答案 0 :(得分:0)

你可以尝试

Dim numbers(50) As Integer
Dim i as integer
i=0
     Do While not rstRGRPT1.EOF
                    numbers(i)=rstRGRPT1.fields(0)
                    rstRGRPT1.MoveNext
                    i=i+1
                Loop