I’m writing a class for saving and retrieving an object into a database. I’m having issues with my class because I added a method to load values from the database which suddenly broke my save method.
My save method, which worked fine before I added the load method, ceased to update existing entries after the load method was added. It still does a fine job of inserting new entries into the DB, but it no longer updates. If I remove the load method, it continues to update and insert fine, but as soon as I add back the load method, I start having issues.
Code examples at: http://forums.asp.net/p/1825368/5072214.aspx/1?New+method+breaks+existing+one
You don’t close the connection in the Load() method.