Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
FOPPEN returns Exclusive when file is shared
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
FOPPEN returns Exclusive when file is shared
Miscellaneous
Thread ID:
00144219
Message ID:
00144219
Views:
58
I employ the following code to test whether the table is being used exclusively somewhere and thus avoid a conflict when 2 tables need to be opened exclusively. The code has worked great for us in FP2.6 and I migrated it over to VFP 6.0. But now it is indicating that a table is exclusively used, when it is opened in another data session as shared. I have a form that opens a database and some of its tables for use by the form. When I try to open the form again (having 2 of the same form open) I get an error message that the table is exclusively opened somewhere else. The other form does not open it exclusively as I can see the table and the status bar indicates a shared open. This seems to happen when a talbe is opened in a datasession. I can run the code from the command line with a table opened as shared and it responds fine. Has anyone seen this error before from FOPEN in VFP?


parameters dlock_l1
dlock_fh=fopen(dlock_l1,0) && Network Exclusive Use
if dlock_fh <0 .and. (ferror()=5 .or. ferror()=31)
dlock_rz=3
ENDIF
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Reply
Map
View

Click here to load this message in the networking platform