locked
cannot write to database. RRS feed

  • Question

  • I'm trying to develop software to update a SQL database using c#

     When I updaate the data it updates correctly.

     When I close the Visual studio c#project and open it again the data has not changed.

     Regards,

     Mike.
    Friday, September 26, 2014 8:54 PM

All replies

  • You're probably using the app_data folder (for a web application) and overwriting the database every time you rebuild.

    To make sure you're always updating you can copy your database and attach to an SQL Express instance instead attaching within your application.


    "If there's nothing wrong with me, maybe there's something wrong with the universe!"

    • Proposed as answer by Fred Bao Monday, September 29, 2014 1:14 AM
    Friday, September 26, 2014 9:51 PM