filling an array(newbie) 
Author Message
 filling an array(newbie)

Can anyone tell me how to fill an array with only one column from a
recordset?  I know I can use GetRows to fill the array with every column,
but will this be less efficient than using some other method?

Thanks!



Tue, 21 Nov 2000 03:00:00 GMT  
 filling an array(newbie)

GetRows will be the most efficient because it is probably written in C or
something and would move the data really quickly.  You could use something
like:

Do Until rs.Eof
    iCount = iCount+1
    vArray(iCount) = rs.Fields("ColumnName")
Loop

But if you could write a nested query to get your one column in a separate
Recordset/Resultset and use GetRows, you'll probably go as fast as you're
gonna go.

Scott

Quote:

>Can anyone tell me how to fill an array with only one column from a
>recordset?  I know I can use GetRows to fill the array with every column,
>but will this be less efficient than using some other method?

>Thanks!



Tue, 21 Nov 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. filling an array(newbie)

2. filling an array(newbie)

3. Button for filling a fill-In field ? (Newbie)

4. Button for filling a fill-In field ? (Newbie)

5. Button for filling a fill In field ? (Newbie)

6. Filling a 3-D array from another array??

7. filling multi-array (array(x, x, x))

8. filling a datagrid at run time - newbie problem

9. Filling multiple datalist boxes - Newbie

10. newbie textbox multiline fill during development

11. list box is one short of filled array.

12. How to quickly fill an array?

 

 
Powered by phpBB® Forum Software