Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to control view updates
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00726867
Message ID:
00727546
Vues:
20
>>2) Use cursorsetprop('buffering',5) to set tablebuffering to optimistic table buffering, to avoid records being automatically updated.
>
>Yes; but in principle you can also check that there are no pending changes before changing to another record. This would be part of your form class. Also, note that there are some restrictions when using table buffering - for instance, you can't create temporary indices, or transactions.
>Hilmar.

hello Hilmar,Victor
I was lucky enough to be given a tip for creating temporary indices and it works! Try this, it works with the view in its default buffering.
LPARAMETERS cCdxName,lcTag_Field

LOCAL nPrimary_Tag
IF lcTag_Field = 'pKey'
    nPrimary_Tag = 'pKey'
    lcTag_Field = 'nproperty'
ELSE
    nPrimary_Tag = lcTag_Field
ENDIF 
SET SAFETY OFF 
IF TAGCOUNT(cCdxName) = 0
    cTmpFile = ForceExt(sys(3), "CDX")
    INDEX ON &lcTag_Field TAG &nPrimary_Tag OF &cTmpFile
    SET ORDER TO (nPrimary_Tag)
ENDIF 
SET SAFETY ON 
Extreme Programming = Plan -> Design -> Code -> Test
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform