Why does GetRows() method return a transposed array?

Viewed 1265

Im using a Adodb connection and reading the result of a query into an array with

array = recordSet.GetRows()

which leads to a transposed array of dimensions

(row,col)

(0, 0)

(0, 1)

(0, 2)

instead of

(row,col)

(0, 0)

(1, 0)

(2, 0)

so it should be a 3 x 1 not 1 x 3 array Any suggestions ?

2 Answers

note that (using ADODB driver):

Range("A1").CopyFromRecordset recordset     ;does not transpose a 
                                            ;recordset
varArray = recordset.GetRows(10)            ;transposes a recordset
Range("A1:L10").Value = varArray            ;does not transposes array
listbox.list = varArray                     ;does not transposes array
listbox.column = varArray                   ;transpose array
listbox.column = recordset.GetRows(10)      ;does not transpose a 
                                            ;recordset
Related