From: JD on
Hi to all,

How can I do to process all the records of a field using Eval or
ForEach. I tried the two ways below, but both return error.

Can you help me?

Thanks!!!

Jairo.


Ex1 (ForEach):
===========

LOCAL oAdoFields AS AdoFields
LOCAL bBlock AS CodeBlock

bBlock := {| oObj | Qout(oObj:value),TRUE}
oAdoFields := oRs:Fields:[Item, name "]
oAdoFields:Foreach(bBlock)


Ex2 (Eval)
========
LOCAL oField AdoField

oField := oRS:Fields:[Item, name "]
eVal(oField, value ")
From: Geoff Schaller on
You can't really. Ditch the code block and write the loop.
Heck its 4 lines of code.


"JD" <jdhora(a)ig.com.br> wrote in message
news:3b3302b1-eccb-4d6a-907e-5f65d591ad3f(a)w17g2000yqj.googlegroups.com:

> Hi to all,
>
> How can I do to process all the records of a field using Eval or
> ForEach. I tried the two ways below, but both return error.
>
> Can you help me?
>
> Thanks!!!
>
> Jairo.
>
>
> Ex1 (ForEach):
> ===========
>
> LOCAL oAdoFields AS AdoFields
> LOCAL bBlock AS CodeBlock
>
> bBlock := {| oObj | Qout(oObj:value),TRUE}
> oAdoFields := oRs:Fields:[Item, name "]
> oAdoFields:Foreach(bBlock)
>
>
> Ex2 (Eval)
> ========
> LOCAL oField AdoField
>
> oField := oRS:Fields:[Item, name "]
> eVal(oField, value ")

 | 
Pages: 1
Prev: VOPP DBF Utility
Next: Advice on multi-threading