Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining maximum number of workareas
Message
From
16/10/2002 18:04:17
 
 
To
16/10/2002 17:51:04
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00711750
Message ID:
00712046
Views:
8
Hello David,

I understand your original question is practical. I was asking if you ever actually:
select 255
use mytable
and I was proposing an alternative. If you USE mytable IN 0, SELECT(1) returns a meaningful result. Also, you can set a variable to the result of SELECT(1) when your application fires up, before any tables are open.

Why not rewrite the function using aused()? Are you dealing with some versions of Foxpro that don't have that function?

>Steve,
>
>No. Actually practical. I didn't know about the aused() function, which Sergey and others told me about. I had written a function that used a for loop - for i = 1 to 255, to check to see if a table was open in the work area, and then close it, except if it was in a list of aliases to keep open. But the thing is that I have some older systems that use this and similar functions, where I'm not sure if 255 is the highest number work area that can be specified - in fact in my tests today on vfp6 - the highest work area # you can specify is 32767, beyond that you get table number is invalid.
>
>I wanted to be able to change my existing functions to use a maxvalue number, rather than having to rewrite the function(s) to utilize aused(), and also, I'm not sure in what version of foxpro aused() was introduced. Actually, I guess what would help the most is to know the max # of work areas per foxpro version or per operating system, if that has any role.
>
>
>
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform