Parsing DBQuery Array

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
ueberyak
Junior Coder
Posts: 31
Joined: Tue Sep 03, 2013 9:45 pm

Parsing DBQuery Array

Post by ueberyak » Fri Dec 19, 2014 11:02 pm

I am successfully running DBConnect and DBQuery. I am struggling to return the values out of the array, however. I pretty much copied what was in the Help section under DBQuery but to no avail. What am I missing?

Here's my code, minus the DBConnect and Let>SQL= bits. (But again, I know I'm returning the data.) There is only one field in the SQL.

Code: Select all

DBQuery>dbH,SQL,rsProdOrders,NumRecs,NumFields,1

Let>r=0
Repeat>r
  Let>r=r+1
  Let>f=0
  Repeat>f
    Let>f=f+1
    Let>this_field=rsProdOrders_%r%_%f%
    Message>this_field
    Wait>.3
  Until>f=NumFields
Until>r=NumRecs

DBClose>dbH
Thanks,
Josh

ueberyak
Junior Coder
Posts: 31
Joined: Tue Sep 03, 2013 9:45 pm

Re: Parsing DBQuery Array

Post by ueberyak » Fri Dec 19, 2014 11:29 pm

I changed

Code: Select all

DBQuery>dbH,SQL,rsProdOrders,NumRecs,NumFields,1
to

Code: Select all

DBQuery>dbH,SQL,rsProdOrders,NumRecs,NumFields,0
and now it works.
Thanks,
Josh

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts