Yes - make her type them all back in by hand!  :-)

Seriously though, I'd never have thought of that.  I'd have done a scan loop
with a seek() but yours is much better.  I tend to avoid relations as they
have bit me in the past, pure laziness on my part I accept.

John Weller
01380 723235
07976 393631

>
> Michael Madigan wrote:
> > The worst Foxpro programming I've ever seen was when
> > the nitwit had a relation set to recno()
> >
> This does have uses and the best example I can think of is when one of
> our trainers was updating some data in a table using foxpro 2.6 (She
> wasn't a programmer - enough said).   She ended up replacing all the 8
> character primary keys with blanks using the replace wizard.  This was
> done in the afternoon so the backup for this table from the previous day
> would be no good as the system had been updated.  This command was
> perfect for this situation as fortunately there were no new records in
> the table.  After restoring the previous days backup to another folder:
>
> use yesterday\a_sname alias old      && yesterdays table
> select 0
> use a_sname alias sname
> set relation to recn() into old
> replace all sn_account with old.sn_account
>
> Hey presto you have all your PK's back.  Anyone think of a better way of
> doing that?



_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to