>>>Then I guess that it would be the same as a SET FIELDS TO ... statement?
>>
>>Maybe... To be honest, I didn't use SET FIELDS TO for years.
>
>I never have used it...but we'll just keep that as our little secret...
I use it in FPD, in the screen code generator, because the generated
code uses memvars and gathers/inserts a record, and just had to make
sure that an accidental memvar doesn't get used for some field of the
same name, so... Set Fields is really a mess, and took me some hours to
figure its behavior out. It's additive by default :(.
Set fields to fld1
Set fields to fld2
What do you get here? Field list consisting of fld2? No - its "fld1,
fld2". So it goes as
Set fields to
set fields to /list comes here/
if new_record
insert into ... from memvar
else
gather memvar
endif
set fields to
I simply had to clear the list before and after.