I need to be able to loop through column names and put the coloumn name and it’s value into a variable. My code looks like this.
SQL = "select column1, column2 from table1"
set rs = conn.execute(SQL)
For each fld in rs.fields
fld.name = rs(fld.name)
Next
rs.close
But this is not working. How can I loop through the column names and set them as variables without having to specify each column name?
Thanks
I think you should use GetRows method. Returns a two-dimensional array. You don’t need column names through GetRows.
Consider this: