Code: Select all
...
Private Sub TEST_ARRAY()
If Not (RS Is Nothing) Then
If (RS.State And adStateOpen) = adStateOpen Then RS.Close
Set RS = Nothing
End If
Set RS = New ADODB.Recordset
SQL = "SELECT LICODART, LICODLIS, LIPREZZO, LISCONT1 FROM " & NOME_DBF_LISTINI & " ORDER BY LIDATATT"
RS.Open SQL, CON, adOpenForwardOnly, adLockReadOnly
NR = 0
Do While Not RS.EOF
DoEvents
NR = NR + 1
RS.MoveNext
Loop
End Sub
....
1)I need to fill MyArray
2) based the first element (LICODART) into my array, filter the related item based myvar=TEST, and retrieve all block of items.
3) loop the result of the filtered block
possible?