Help with capturing and iterating through database for comparison Follow

Todd Sirois


I am running Bartender Automation Edition, fully licensed, latest Edition as of 4/4/18

I'm having some confusion on how database fields work.

I have a database connected from an .xls with several columns (fields)

Let's say I have a datasource of:  FIELD: <filename>.Number     (where Number is one of the column names, with some Part Numbers under it eg: "System1")

I want to vbscript to iterate through the results of  FIELD: <filename>.Number so I can test the results against another variable eg; the term "System1"

I have an understanding of how VBScript works but when I try to iterate (For..Each... Next) through  FIELD: <filename>.Number 

   For each n in Field(Number)

   ... do something...


I get: "Object is not a collection"

If I give the datasource a name "unitnumber" and try:

  For each n in unitnumber

  ... do something...


I get: "Object doesn't support this property or method."

Is it possible to iterate through the field from a database connection, with vbscript in this manner?

Please sign in to leave a comment.