Working with Multiple Rows of Data
The Fetch, Insert, Update, Remove methods of a connection use a RecordCount parameter and may operate on more than a single row at a time. However, the LCFiedllist parameter must have been created to hold more than one record for this to work. You may operate on fewer records than the Fieldlist was created with, but not more.
A simple example of different configurations for RecordIndex and RecordCount might be as follows:
Dim Records as New LCFieldlist (3, LCFIELDF_TRUNC_DATA)
Dim count As Long
Dim i As Long
...
Call connection.Fetch (Records, 1, 3) ' fetch up to three records
Call connection.Insert (Records, 3, 1) ' insert them
'in reverse order
For i = count To 1 Step -1
Call connection.Insert (Records, I, 1)
Print "IName(" & I & ") = " & Records.IName(i-1)
' retrieve a value from the array of IName field values.
Next
If you retrieve multiple rows, the field (IName in this case) will have multiple values. Although the records are indexed starting at 1, the index of the array of field values starts at 0, so to read a field value from row n of the result, you should ask for Records.fieldname(n-1).