Subject |
Re: Update |
From |
Bob McKinney <bmbkinney721@comcast.net> |
Date |
Thu, 19 Oct 2017 11:12:49 -0400 |
Newsgroups |
dbase.getting-started |
Hi Alshat: thanks for the CB. Code would really help. Have been of and on w/db since dbll before Dos. At 94, the memory part is a little slippery. thanks again......Bob
>Akshat Kapoor Wrote:
> > The updateAppend() method of the UpdateSet class that Bob wants to use
> > is quite a different animal to the XDML APPEND FROM and it works quite
> > differently.
> >
> > APPEND FROM simply adds records from one file to another. It doesn't
> > check to see if the record already exists in the target file or not.
> >
> > The append() method of the UpdateSet class does the same thing as APPEND
> > FROM.
> >
> > The UpdateSet class also has update() and updateAppend() methods which
> > work differently.
> >
> > To use update() or updateAppend() the target rowset must be indexed. The
> > help file only notes that for .dbf files this must be a "valid index"
> > but, as I see it, this should be an index on a primary key otherwise the
> > wrong record may be updated. Update() will look for a matching record
> > in the target table and update any changed fields. If it doesn't find a
> > matching record it does nothing. updateAppend() will update matching
> > records and will add a new record to the target table if a matching
> > record is not found.
> >
> > UpdateSet is great for copying data from a SQL server to .dbf files.
>
> Wow all this can be done in auto mode
> There is never an end to the learning process and I have barely started.
> I would have coded this step if required
>
> Regards
> Akshat
|
|