Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
USEing Views Produces 'Attempting To Lock'
Message
From
15/04/2002 20:19:13
Mike Yearwood
Toronto, Ontario, Canada
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00645244
Message ID:
00645247
Views:
10
Hi

Take a look at this...

http://fox.wikis.com/wc.dll?Wiki~CreatingDBCforViews~VFP

>Hi Everyone,
>
>I have a VFP 6SP3 COM (multithread) dll that clients are using on a webserver. When testing server scalability by using WebStress, they reported all kinds of errors back to me. I ran the same test and discovered that the problem has to do with USEing views.
>
>Apparently, when you USE a view, as in "USE database!view_name", VFP places a lock on the view record in the database container. Doesn't this seem to be a bug in VFP? Why would it need to place a lock in this scenario? Has anyone heard whether Microsoft is planning to fix this?
>
>STEPS TO REPRODUCE PROBLEM:
>
>Replace "mydatabase" with your database name
>Replace "myview" with your view name.
>
>Cut and paste and run in multiple VFP windows simultaneously:
>
>OPEN DATABASE mydatabase
>DO WHILE .T.
> USE mydatabase!myview
> REQUERY()
>ENDDO
>
>You should see "Attempting to Lock" periodically appear in the statusbar. This is because one window has the lock at the exact instance the view was being USEed in the other window.
>
>Another way to do this is to USE your database.dbc in a VFP window, locate the View record and RLOCK() it. Then, in another VFP window, simply execute USE database!myview and it will say "Attempting to lock" until you release the lock in the first window.
Previous
Reply
Map
View

Click here to load this message in the networking platform