VB Code:
'not tested but it should :D work (too lazy to make a mockup of ur MyReader) Dim colCustomers As Collection Dim strArray(9) As String 'Dim CusArray(0, 9) While MyReader.Read strArray(0) = MyReader("CustomerId") strArray(1) = MyReader("FullName") strArray(2) = MyReader("Company") strArray(3) = MyReader("BillingBuilding") strArray(4) = MyReader("BillingStreet") strArray(5) = MyReader("BillingStreet2") strArray(6) = MyReader("BillingTown") strArray(7) = MyReader("BillingCounty") strArray(8) = MyReader("BillingPostCode") strArray(9) = MyReader("BillingCountry") 'Add To Collection colCustomers.Add(strArray) End While 'Now Im guessing that you really need the data in a 'multi-dimetimetion array Dim cusArray(colCustomers.Count - 1, 9) Dim I As Integer Dim X As Integer For I = 0 To colCustomers.Count - 1 For X = 0 To 9 strArray = colCustomers.Item(I + 1) cusArray(I, X) = strArray(X) Next Next





Reply With Quote