Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Local View with Views in JOIN condition
Message
From
09/03/2006 16:53:05
 
 
To
09/03/2006 15:11:13
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01101756
Message ID:
01102923
Views:
42
<snip>

>I've looked through your code. Different people may draw different conclusions from the same code. I was interested in your conclusions not mine. When you are posting wrong conclusions, I feel obligated to respond because some people may get in trouble if they follow them. For me, "bigger workarea" and "workarea order" are not connected terms. I believe that most recently opened work area for referenced view is used, perhaps, you meant the same saying "work area order involved".
>
>Thanks,
>Aleksey.

You are right.

VFP use the last opened work area (work areas is a LIFO list )
CLEAR
CLOSE DATABASES all

DELETE FILE testRequery.d*

CREATE DATABASE testRequery
CREATE TABLE testRequery (f1 I)
INSERT INTO testRequery VALUES (1)

CREATE SQL VIEW VIEW1 as select * from testRequery!testRequery 
CREATE SQL VIEW VIEW2 as select * from testRequery!View1 

CLOSE DATABASES all

OPEN DATABASE testRequery
USE VIEW1 IN (SELECT(0)) ALIAS FIRST

USE View2 IN 0  && THIS USE FIRST

* 1, 1
? 1,RECCOUNT("FIRST"),RECCOUNT("View2")

USE VIEW1 IN 0 NODATA ALIAS RECENTLY

REQUERY("View2") && THIS USE RECENTLY

* 1,0,0
? 2,RECCOUNT("FIRST"),RECCOUNT("View2"),RECCOUNT("RECENTLY")

INSERT INTO testRequery VALUES (3)

REQUERY("RECENTLY")

USE DBF('FIRST') IN 0 AGAIN ALIAS ANOTHER && THIS IS NOT A REQUERY !

REQUERY("View2") && THIS USE ANOTHER

* 1 , 1 , 2, 1
?9,RECCOUNT("FIRST"),RECCOUNT("View2"),RECCOUNT("RECENTLY"),RECCOUNT("ANOTHER")

USE IN ANOTHER

REQUERY("View2") && WHAT THIS USE ?  THIS USE RECENTLY

* 1 , 2 , 2
?9,RECCOUNT("FIRST"),RECCOUNT("View2"),RECCOUNT("RECENTLY")

CLOSE DATABASES all
DELETE DATABASE testRequery DELETETABLES
Aleksey,

On Message #1102243 you writes
If it finds cursors for those views it'll use data from them, no REQUERY is done for those cursors.
Which cursor ?

On Message #1102585 you put an example without an explanation.

Only now we know what cursor VFP use.

But, this is not documented, therefore VFP could change way of working
( to use another work area )

Do you explain me which REQUERY() of view1 a developer can do?
- All ?
- Close all and USE a new

It is not possible to use a system of this type.

Fabio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform