Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
.DBC for views
Message
 
 
To
12/06/2001 16:33:17
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00518600
Message ID:
00518636
Views:
19
>Hi all
>
>According to page 159 of Certfox, a .DBC record is locked when a view is requeried AND this lock prevents others from doing a query until the results are returned. If that's true, it should be demonstrable with only 2 users and a query against a large table returning lots of records.
>
>So, I tried it. Query progress bars were active on both machines, but if I interpret CertFox correctly, one machine should have had to wait.
>
>It should be possible to show record contention with 2 users. Anyone have any code that could demonstrate this?

I think you are going to have a helluva time making this happen. The DBC record is only locked to create the structure of the view, then unlocked. It is not locked for the duration of the data query process. For this contention to hit, both requests for the same view have to hit the DBC at the same time.

You can simulate this.

SET EXCLUSIVE OFF
OPEN DATA MYDATABASE
USE MyDataBase.DBC AGAIN ALIAS MyDBC
* browse for any record that is a view.
? RLOCK() && should return .T.
select 0
USE THAT_VIEW
* Now you get the error message
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform