Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What is the '32K work area range'?
Message
De
21/02/1997 00:51:55
 
 
À
21/02/1997 00:28:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00021225
Message ID:
00021483
Vues:
41
>>>>I keep getting error 'Cannot access the selected table' (number 1152), but I have ruled out the possibility of a reference to a file variable in a table that is not open, even in a POPUP ... PROMPT FIELD in the menu causing it. The help for this error says 'You have attempted to select a table outside the 32K work rea range...'. Can some one tell me what this means, and how I can make sure this does not happen?
>>>
>>>There are 32768 addressable work areas to open a table (from 0 to 32767). Probably you have somewhere in your program a:
>>>
>>>Select n
>>>
>>>where n is greater then 32767.
>>>
>>>Vlad
>>
>>Thanks Vlad,
>>
>>I checked my SELECT commands, and they're all by name, or zero, so it's still a mystery to me. I make the application QUIT after an import process to avoid this error! Looks like it will just have to stay that way.
>>
>>Alistair.
>
>Weird...
>
>Check also the SET COMPATIBLE. SELECT command (or the SELECT() function ?) depends on it.
>
>Can't you locate the statement that generates the error?
>
>Vlad

The SET COMPATIBLE is for the SELECT() function. I don't use that.

When I try to locate the offending command with the debugger, it's very difficult. The error message does not appear while in the debugger. I have to switch to the APP to see the message. So I have to switch back and forth between them to work out what's causing it!
The message only has OK and Help buttons, so I can't just suspend when it happens.
What's more, I have my own error handler active, yet it doesn't trap the error. The error still appears in the default VFP message box.
When I have managed to find out which line causes it; a SELECT IN command to close a table, I tried the same command in the command window just before the app was going to do it, and it works fine.
The app does 2 SELECT IN commands at this point, and the message normally appears after doing the second one. So I stop it before the first one, do the second one at the command window, which works, then continue the app and the message then appears after the doing the first SELECT IN.
These commands are using aliases, so the work area number must be right.
Actually, this has given me a thought. I'll use the SELECT() function to find out what number is returned by these aliases. Maybe I'll get something spurious.

It's weird alright.

Alistair.
Alistair McIntosh
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform