Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File is in use
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Miscellaneous
Thread ID:
00167429
Message ID:
00167724
Views:
26
Assuming you do not need KEYS opened exclusively, but only your other 'legacy' tables, you can use the 'SHARED' parameter to explicitly open the keys table as shared. I believe this should solve your problem. Go through the application and/or stored procedures and change them to:
IF !USED("keys")
    USE skaset!keys <B>SHARED</b> IN 0 
ENDIF
>You are right - 'keys' is indeed being opened exclusively in another data session. The code that opens 'keys' and gets new keyvalues is in a stored procedure called 'newid' which is called as the Default Value trigger from every keyfield. This code came from TASTRADE. The form that edits the table that generates the error has a private datasession due to an old bug workaround which I haven't fixed yet. It is opened exclusively because it is a legacy app originally designed for standalone use.
>
>I still have some problems:
>
>1. If the keys table gets opened in the other datasession, why does USED('keys') return false? My debugger indicates that no alias for 'keys' is being used at any point, and I have no code that gives it an alias. Is this a known bug? Was it fixed in version 5 or 6?
>
>2. This stored procedure is part of my framework, and needs to account for the general possibility that it will be called from tables opened in forms that have private datasessions and SET EXCLUSIVE ON. I assume that the code in TASTRADE didn't close 'keys' because it assumes otherwise, and because closing and opening this small table repeatedly would slow things down. Do I have to close 'keys' in the stored procedure newid() anyway, or is there a better workaround?
>
kenweber
GCom2 Solutions
Microsoft Certified Professional

Previous
Reply
Map
View

Click here to load this message in the networking platform