Another way is to use a scan/endscan loop with scatter name <<oObject>> memo and then an associated gather name <<oObject>> memo after an append blank.
That way only fields which exist in the gather table will be transferred and you can also modify the oObject properties (fields) if required before the gather.
Dave
-----Original Message-----
From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Gene Wirchenko
Sent: 07 July 2016 19:16
To: ProFox Email List <profox(a)leafe.com>
Subject: Re: xBASE Appending from a Cursor
At 16:37 2016-07-06, Gianni Turri <giannit62(a)gmail.com> wrote:
>On Wed, 06 Jul 2016 15:57:20 -0700, Gene Wirchenko <genew(a)telus.net> wrote:
>
> >Hello:
> >
> > I ran into some trouble writing an update program for my app.
> >Having not done it for quite a while, I forgot how to xBASE append
> >from a cursor. A simple
> > append from thecursorname
> >does not work. Instead, I finally remembered the, rather less-than-obvious
> > append from (dbf("thecursorname"))
> >
> > Is there a better way?
>your way in correct!
>
>And then there is the SQL way:
>
>insert into YourCursor ;
> (Field1, Field2, Field3, FieldX) ;
> select Field1, Field2, Field3, FieldX ;
> from thecursorname
>
>or
>
>insert into YourCursor ;
> select * ;
> from thecursorname
>
>Make sure that the implicit and / or explicit fields lists do match.
That is why I use the xBASE append: I do not have to bother with a column list. That is just duplicating table/cursor definitions and is prone to error (as you allude to).
Sincerely,
Gene Wirchenko
[excessive quoting removed by server]