Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create View with (Buffering = .T.)
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Create View with (Buffering = .T.)
Divers
Thread ID:
01130513
Message ID:
01130513
Vues:
69
Hello,

I am using the following scenario:
OPEN DATABASE MyDBC
OPEN DATABASE ViewDBC
*
USE MyDBC!MyTable ALIAS MyTable
=CURSORSETPROP("Buffering",5,"MyTable")
*
SET DATABASE TO ViewDBC
CREATE SQL VIEW MyView AS ;
	SELECT	MyField ;
	FROM MyDBC!MyTable WITH (BUFFERING = .T.)
*
DBSETPROP("MyView","VIEW","TABLES","MyDBC!MyTable")
DBSETPROP("MyView","VIEW","SendUpdates",.T.)
DBSETPROP("MyView.MyField","FIELD","KEYFIELD",.T.)
DBSETPROP("MyView.MyField","FIELD","UPDATENAME","MyDBC!MyTable.MyField")
DBSETPROP("MyView.MyField","FIELD","UPDATABLE",.T.)
*
SET DATABASE TO MyDBC
*
Use ViewDBC!MyView ALIAS MyView IN 0
*
?MyTable.MyField && Returns 0
?MyView.MyField && Returns 0
*
REPLACE MyField WITH 1 IN MyTable
*
=REQUERY("MyView")
*
?MyTable.MyField && Returns 1
?MyView.MyField && Returns 0
I must admit that I expected the field in the view to show the same value as in the buffered table. Perhaps the Buffering=.T. in the view is ignored?

Is there a way to have the requeried view fetch the data from the buffered table?
Christian Isberner
Software Consultant
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform