Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File access denied
Message
 
To
31/03/1997 15:07:52
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00026252
Message ID:
00026504
Views:
42
>>>The files are all stored on a local drive. As the program is still being built, only I have access to the files. None of the entry forms use any tables in the dataenvironment except for completely unrelated verification fields to fill in list boxes.
>>>I just tried "set exclusive off" before opening the project, and it now allows me to open the forms, but when I attempt to open the tables shared (behind the add record button) I get File access denied. I have a feeling I know why this happens, but I don't know how to fix it. In the main form's data environment, the exclusive property for the view used to fill the grid is set to true, but it is 'greyed' out; it cannot be changed. How can I tell a view to open it's tables shared?
>>
>>1) Have you tried something like this that checks for currently open files?
>>
>>procedure opendbf
>>parameters dbname,dbalias
>>if empty(dbalias)
>> store dbname to dbalias
>>endif
>>if used(dbalias)
>> select (dbalias)
>>else
>> sele 0
>> use (dbname) again alias (dbalias) shared
>>endif
>>return
>>
>>2)Have you tried setting the thisform.datasession property to 2-private ?
>
>hmmmm......that was going to be *MY suggestion, although the error given is usually "File is in use"

Try putting all the tables used in the View SQL into the Dataenvironment where you can oversee that they are used Shared. That way you can also be sure they're CLOSED appropriately. I've found that letting a view open its own tables will lead to strange behavior, often because they are not opened or closed as I wish.

Barbara
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform