All pastes #99797 Raw Edit

Miscellany

public text v1 · immutable
#99797 ·published 2006-07-25 17:29 UTC
rendered paste body
Function sqEchoRecordset(ByRef poRecordset As ADODB.Recordset)

    Dim i               As Long
    Dim j               As Long
    Dim iMax            As Long
    Dim sRecord         As String
    Dim arrResult()     As String
    
    j = 0
    poRecordset.MoveFirst
    
    Do While Not poRecordset.EOF
    
        ReDim Preserve arrResult(j + 1, poRecordset.Fields.Count - 1)
    
        For i = 0 To poRecordset.Fields.Count - 1
        
            arrResult(j, i) = poRecordset.Fields(i).Value
            
        Next
        
        j = j + 1
        poRecordset.MoveNext
        
    Loop
    
End Function