I encountered a strange problem yesterday. When I was testing the project, I wanted to operate a certain table in the ACCESS database, but when I wanted to open its design view, a warning that I could not open it for modification popped up! It says that a certain view is bound to this data table and cannot be operated currently! Strange! I have never encountered such a problem. Am I unable to modify this table? And the table always appears locked. After working on it for a long time, I realized it was late and had to go to bed first. I came back today to continue researching, but it still didn’t work. I could only check it online. Finally, I saw someone mentioned this problem online and said that it might be that the connection to the database was not closed. I didn’t believe it because I had always used SQL to do it, even if I sometimes forgot about it. Closing the database connection should not do this either. So I opened the page I was testing, and sure enough I found that the database was not closed and neither the data reader nor the data connection was closed, so I immediately wrote the closing statement and retested! This time it’s done! ! The database was finally restored to a state without locks, and the tables I wanted to operate could be designed normally. The stone in my heart fell to the ground. It turns out that if the data is not closed in time, such terrible results will occur. I never paid attention to it before. It seems that I really need to develop good habits in the future. So I wrote an article right away. I hope it can help friends who have had this experience. Veterans, please don’t laugh at me. Haha, although I am only a little kid, I still hope this article can help some friends.
I hope everyone can develop good habits in the future. Please remember to close the database in time after use, otherwise... Haha
http://www.cnblogs.com/Monday/archive/2006/11/24/570477.html