Recently, it is found that when the order browsing screen is opened, the system will throw an error message indicating that there is no data in the 0 rows. It is a search condition problem in the beginning,
In addition, the number of times of appearance is relatively small, there is no regularity, and there is no great impact on system operations, so there is no special care. However, today, it happened to pass the pipeline.
The error can be reproduced in this way, so I decided to find out the reason. Through step-by-step tracking, we find that every time we use dataview
New is not used for initialization. After each declaration, the value is assigned directly through dataview DV = DT. defaultview;
After DV is used, set DV. rowfilter = "***".
As a result, I found that DV. rowfilter has been assigned a value when I followed dataview DV = DT. defaultview,
It is strange that the data shows that since the memory is not re-allocated to dataview, the system has directly allocated the dataview memory in other images.
(Dataview declares the same names in these images), so it is not surprising that the DV. rowfilter value has been assigned.
The strange bug is also solved. Therefore, after declaring an object in. net, we should first create a new object and then assign a value to prevent such a bug.