Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Shawn Ottinger
  Where is Shawn Ottinger?
 Greeneville TN
 Tennessee - United States
 Shawn Ottinger
 To: Paul Culbertson
  Where is Paul Culbertson?
 Texas - United States
 Paul Culbertson
Subject: RE: Array sorts
Thread ID: 299 Message ID: 307 # Views: 2 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Tuesday, May 22, 2001 1:02:05 PM         

> > > > I am currently working on a projects that requires me to sort a multidemisional array on three different columns (kinda like an order by in SQL). Is there an easy way of doing this or do I need to keep writing my own routine to accomplish this?
> > >
> > > Check out the asort() or you can create a cursor and append the info into the cursor then sort the cursor with an index and copy it back to an array if you need to work with the array and not the cursor.
> > >
> > > Hope this helps.
> > >
> > > Paul Culbertson
> > >
> > > Houston, TX
> > >

> >
> > I have thought of the cursor idea also. I need the information in an array becouse I am using it in a grid.
> > These two statements lead me to a question I have had for a while now. With this program I am using three tables at the same time throughout the program. I have had trouble when I try to open fourth table. Is Fox Limited to using three tables at a time or am I doing something wrong?
> > I am self taught in foxpro so Im sure there are alot of basic concepts I need to learn to make life easier.
> > I am currently trying to make a routine with asort. As far as I know asort only sorts on one column.
> >
> > P.S. (For all of you out there) I have learned alot just from this board.
> I can't recall what the actual number of workareas available are but it is certainly more than 3, hell i have over 60 tables open in one datasession for a form that preforms alot of system maintenance and working of accounts.
> To open multiple tables the best practice is to use the following idea:
> use customer in 0 shared alias customer
> use payments in 0 shared alias payments
> use paydetail in 0 shared alias paydetail
> use salesman in 0 shared alias salesman
> This would open 4 tables. Assuming the tables are not already open.
> you can use the format of the following to check if the table is open and if not then open it.
> if !used("customer")
> use customer in 0 shared alias customer
> endif
> I generally do not open tables with an alias other than the name of the table. If you do then you can run into problems trying to open tables. If you need to open the tabes for special reasons use the datasession object that vfp6 sp3 offers.
> Paul Culbertson
> Houston, TX


I had been opening them in this fashion
use table1 in 1
use table2 in 2
use table3 in 3
use table4 in 4 (This one has never worked)

then I would select 1
and do whatever.

You've given me something to research (I guess Ill learn even more today)


Array sorts Posted by Shawn Ottinger @ 5/22/2001 10:47:12 AM
RE: Array sorts Posted by Paul Culbertson @ 5/22/2001 11:49:58 AM
RE: Array sorts Posted by Shawn Ottinger @ 5/22/2001 12:38:30 PM
RE: Array sorts Posted by Paul Culbertson @ 5/22/2001 12:52:12 PM
RE: Array sorts Posted by Shawn Ottinger @ 5/22/2001 1:02:05 PM