General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>>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.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only