How do I select specific columns in ADO using getstring?
3 answers
You can not. GetString returns all columns of all or a specified number of rows. You will need to go through the recordset to get the columns you want.
All this is in the documentation .
+2
source to share
You can also use a combination of join and getrows
myString = join(rs.getrows( , , myColumn),";")
- rsGetrows returns an array containing only myColumn values
- The connection will pass the array into a string like "value1; value2; ..."
Check the exact syntax as it was written on the fly
EDIT: unfortunately it can't be as straight forward as .getrows will return an array of 2 dimensions. Are there any functions that can extract one dimensional array from 2d? It can be easily written, right?
-1
source to share