Forum Moderators: open
Get rows always produces a 2D array I believe, rows (dimension 1) and columns (dimension 2) representing your dataset.
You will need to find out the upper bounds of your 2nd dimension and then add one to it for the extra column.
'Get the column and row count
rowCount = UBound(myArray, 1)
columnCount = UBound(myArray, 2)
'Add the extra column
Redim Reserve myArray(rowCount, columnCount + 1)
'Then you will need to loop through the rows and update the new column to 0
For i=0 to rowCount
myArray(i, columnCount + 1) = 0
Next
I didn't test the above code but it should work in theory or get you close.
Also, couldn't you just add the 0 at the end of your select statement? "Select col1, col2, col3, 0 from mytable"
[edited by: TheNige at 8:32 pm (utc) on April 30, 2007]