Cita: RS.Open sql, cxn
if Err=0 then
tantos=0
while RS.EOF=false
tantos=tantos+1
RS.movenext
wend
end if
RS.close
en lugar de hacer 2 querys uno para dimensionar el arreglo y otra para llenar los el arreglo con los datos de la tabla, mas recomendable serìa hacer los dos en un solo query, asì te evitas tantas lecturas similares a la base de datos y por ende se hace mas ràpido.
sql = "select COLUMNA from TABLA where CONDICION"
RS.Open sql, cxn
if not RS.EOF then
tantos=0
while RS.EOF=falseREDIM PRESERVE ARREGLO(tantos)
ARREGLO(tantos) = RS(0)
tantos = tantos + 1
RS.movenext
wend
end if
RS.close