dBASE Programming - Sorting tables and then leaving them as is

This is Interesting: Free IT Magazines  
Home > Archive > dBASE Programming > October 2006 > Sorting tables and then leaving them as is





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Sorting tables and then leaving them as is
Pat Curran

2006-10-03, 7:25 am

Hi;

I use v5.5. Is there a way to set an index and then leave the records in
that order even if values in the index are changed?

For an example, Say I process orders by the date and weather they have been
filled or not. So now, all of my unfilled orders will be at the top of my
browse. If I change the filled field to .t., currently the record
repositions itself to somewhere in the middle or bottom of the browse, and I
have to use goto top to go back. This can be time consuming if I am not
able to fill the top few records for some reason. Once the records are
sorted by date and filled, I would like them to remain in that order until I
hit a pushbutton to re sort them.

Thanks for any advice

Pat


Mervyn Bick

2006-10-03, 7:23 pm

On Tue, 03 Oct 2006 10:15:14 +0200, Pat Curran <curranpg@hotmail.com>
wrote:


> I use v5.5. Is there a way to set an index and then leave the records in
> that order even if values in the index are changed?


Angels rush in and all that jazz. <g> I've never used dBASE 5.5 so I
honsestly don't know but I doubt it. If I'm wrong I'm sure I'll hear all
about it soon enough. <g>

You are probably going to have to copy the indexed file to a temporary
file which will keep the records in their pre-edit order. Do the edit on
the unindexed temporary file. When you are done, zap the indexed file and
append from the edited file. The index will rebuild as the records are
added and your amended records will find their proper places.

Mervyn.
David Kerber

2006-10-03, 7:23 pm

In article <RkJheWs5GHA.1764@news-server>, curranpg@hotmail.com says...
> Hi;
>
> I use v5.5. Is there a way to set an index and then leave the records in
> that order even if values in the index are changed?
>
> For an example, Say I process orders by the date and weather they have been
> filled or not. So now, all of my unfilled orders will be at the top of my
> browse. If I change the filled field to .t., currently the record
> repositions itself to somewhere in the middle or bottom of the browse, and I
> have to use goto top to go back. This can be time consuming if I am not
> able to fill the top few records for some reason. Once the records are
> sorted by date and filled, I would like them to remain in that order until I
> hit a pushbutton to re sort them.


I don't remember what it's called, but there is an option which will
cause your current editing line to follow the record to its new
location. Search around and I think you'll find it.

--
Remove the ns_ from if replying by e-mail (but keep posts in the
newsgroups if possible).
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com