I made a mistake.

Source: Internet
Author: User
Today I found that I made a mistake in the project. This often happens on the same page. After the customer clicks the button, ProgramDetermine whether this record exists. If yes, perform update; otherwise, insert. At that time, in order to save time, a viewstate is saved in the page to record whether the existence of the record exists, and the user thinks that the database is not checked once. However, you should jump out of this page after you forget the operation is successful, and a problem occurs. When you enter this page, the first operation saves the status of the record to be added and continues to save, because the page is not displayed, the program remains added.
Think about this error. You can try the following methods in the future:
1. Delete the original record and add it again
2. determine at the business layer whether to add
3. jump out of the interface after the operation is successful

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.