Small bug generated by Ms dataset ide when using the SDF Database

Source: Internet
Author: User

When the ableableadapt set generated by vs IDE is used in different forms to access the SDF database, if the database is modified in the first form, then the second form is new, and read the datatableadapt In the second form. The read data is the data before the modification.

I am very embarrassed about this phenomenon.CodeThe reason cannot be found at the level. the breakpoint indicates that the data is the old data when dataadapt takes the data and fills it into the dataset. However, using ADO to directly execute SQL queries is the normal data after modification. In this case, like a cache, the generated code reads the old data every time. WhenProgramAfter it is disabled, it is enabled again. I don't know if it is a problem with the SDF database, but it does exist ......

After finding this problem, I found the code problem for a long time, but it was still fruitless. Finally, I wrote ADO to fill the dataset and showed it to the datagridview. Winform development is a bit interesting. If you are not familiar with it, sometimes it is too disgusting ......

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.