You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
No sure if anyone else is having this problem but i can't seems to save to the sql sqldatabase when i use the tableadapter.insert & update it is display to the datagridview but once i close the whole program and open the sql database the data is gone.... anyone can help?
what order are you calling only the update command. showing some code might help. be sure you are referencing the right dataset/datatable as the parameter.
Yeah, it doesn't work for me either, and the code is 100% correct. I've show it to experts and the code works on other peoples machines. I'm not sure why, but on some peoples machines, it simply doesn't work.
When you run / debug an application the database is by default copied to the output directory. Any data updated by your application is updated in that copy of the .mdf file. When you exit the application and go back to the project window you are working with the original database, prior to edits by your program. The next time you run the program, the database is again over-written as part of the compile process.
I just read this topic recently and it's one of the problems I am facing as a new .Net programmer. So what is the solution to this? How can the changes in the copy of the .mdf directory be transmitted to the original database in real time such that the inserted data at runtime can be seen in the tables after debugging? In fact I am experiencing this problem only with the windows application. The database works just fine with my ASP.Net Applicaition