Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to control view updates
Message
 
To
26/11/2002 16:19:51
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00726867
Message ID:
00727546
Views:
19
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform