Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>Hi Elyse.
>>
>>>I've marked all of my views as NoDataOnLoad in the DataEnvironment but they still take a long time to open. Why would the statement USE MyView NODATA take a long time to execute?
>>
>>There was a tip in FoxPro Advisor a few issues back on this topic. If I recall, it's due to the way VFP handles SET DELETED when you open a view NODATA. Try SET DELETED OFF before opening the views NODATA, then SET DELETED ON; that seems to improve the time VFP takes to create the empty cursor.
>>
>>Doug
>
>
>I don't understand why, but this helped tremendously! Now the views load instantaneously. Thanks!
>
>Elyse
One comment on this. This is fine for NODATA but if set deleted is off when you actually get the data, the view will have all matching records (if parameterized) including deleted records, except the deleted records will not be identified as such in the view!
I discovered this rather nasty condition when deleted records were showing up in reports because deleted was off when the view was opened. So if you have a data environment where some views return data (based on parameters) and some have NODATA, setting DELETED OFF may cause problems.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement