Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Local View with Views in JOIN condition
Message
De
09/03/2006 16:53:05
 
 
À
09/03/2006 15:11:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01101756
Message ID:
01102923
Vues:
31
<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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform