Using a list to loop through records

cn = sql::Connection

rs = sql::ResultSet

args = sql::Arguments

vsql = "SELECT client_id FROM client"


rs = cn.resultset

clst = rs.ToString()

'==update Client with total hours and hourly charges

dim vttl_amt as n

dim vttl_hrs as n

for each foo in clst

       vsql = "SELECT * FROM billing WHERE type_id='HRS'


       rs = cn.ResultSet

       vttl_amt ="ttl_amt")

       vttl_hrs ="ttl_hrs")

       vsql = "UPDATE client SET c_cur_hrs_charges={vttl_amt},c_cur_hours={vttl_hrs} WHERE client_id={foo}"

       vsql = evaluate_string(vsql)

       if cn.execute(vsql) = .f.

               lst3 = lst3 + cn.callresult.text + crlf()

       end if