Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
View DBC Contention
Message
From
26/08/2011 07:18:29
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
25/08/2011 19:00:10
Joel Leach
Memorial Business Systems, Inc.
Tennessee, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01521812
Message ID:
01521860
Views:
44
>I confirmed that the DBC is indeed shared across multiple instances of an EXE, even when it is compiled into the DBC. In one worker, I opened a DBC, found a record associated with a view, and put an RLOCK() on the record. Other workers then tried to open the view and received an "Attempting to Lock..." message indefinitely. I don't know how VFP shares the DBC (probably by means of temporary files), but including the DBC in the EXE alone does not make it immune to contention.
>
>However, VFP does allow you to open the database exclusively. This does not lock other workers out of the DBC and the contention issues go away as well. So, it's a two-step workaround: 1) compile the DBC into the app/exe, and 2) open the database exclusively. I am doing this when the workers startup, and so far, there are no repercussions.

This is so counter-intuitive that I wonder how did you ever get such an idea :). Glad that it worked.

OTOH, if the app used a loader, so everyone would run their own copy of the dbc inside their own copy of the exe... I wonder if the contention would ever happen. And then, would there be any speed gain if the dbc-in-exe was opened exclusively. The locking happens on the network/filesystem levels, and always takes some time, so if it can be circumvented (or at least done only once), I guess it would run faster.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform