Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Highest USED workarea
Message
From
06/08/1999 17:33:14
 
 
To
06/08/1999 17:15:43
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00250374
Message ID:
00250928
Views:
24
Jim-
I just did a quick test.
use dataprg\bbonein
sele 0
use main!vwpairin
dime x[1]
y=aused(x)
After this, y = 3 (bbonein, vwpairin, and the other table involved in the view), and the array's elements are: Element 1 = vwpairin (WA=2); 2 = nopair (WA=3); and 3 = bbonein (WA=1).

So, you can't count on the sort, that's for sure. Also, the array gives what you are looking for.
use dataprg\bbonein
sele 0
use main!vwpairin
dime x[1]
y=aused(x)
FOR lni = 1 TO ALEN( x, 1 )
IF DBF( x[lni,1] ) = cDBF
*!* then exit and do whatever
lnArea = x[lni,2]
EXIT
ENDIF
NEXT lni


HTH

>>>Thank you to all who replied.
>>>
>>>Looks like the AUSED() function is the hands down winner for finding the highest "used" workarea. Testing it several ways, it looks like AUSED() does create an array that is already in descending order with the highest used workarea in row 1 of the array.
Previous
Reply
Map
View

Click here to load this message in the networking platform