RobertP
3rd December 2015, 21:24
Hello
I have a recursion script I'm developing. But I need to know whether a selectempty was reached in order to drill down another tree of data. Any idea? I cant use a static variable because child records reset parent variables.
example:
sql.a=sql.parse("select cprrp912.* " &
"from cprrp912 " &
"where cprrp912._index2 = {:1, :2} ")
sql.where.bind(sql.a,1,"ACT")
sql.where.bind(sql.a,2,sub.record)
a.sql(level.recursion)=sql.a
sql.exec(sql.a)
while (sql.fetch(sql.a) = 0)
record.found = true
|do something
endwhile
if not record.found then |this doesnt work. I need a selectempty above
Thanks
I have a recursion script I'm developing. But I need to know whether a selectempty was reached in order to drill down another tree of data. Any idea? I cant use a static variable because child records reset parent variables.
example:
sql.a=sql.parse("select cprrp912.* " &
"from cprrp912 " &
"where cprrp912._index2 = {:1, :2} ")
sql.where.bind(sql.a,1,"ACT")
sql.where.bind(sql.a,2,sub.record)
a.sql(level.recursion)=sql.a
sql.exec(sql.a)
while (sql.fetch(sql.a) = 0)
record.found = true
|do something
endwhile
if not record.found then |this doesnt work. I need a selectempty above
Thanks