SQL Express

Tables in SQL Express not saving updates from VB 2005 Express forms.

Temporary tables are staying updated until program is exited, but not updated to the SQL datadase tables.

I Have completely uninstalled all the express software including .Net 2.

Any answers.



Answer this question

SQL Express

  • NandaRengasamy

    Hi flashg,

    Could you let us know if this was indeed the issue you were seeing Feel free to mark the best post as the answer.

    Regards,

    Mike Wachal
    SQL Express team

    ----
    Check out my tips for getting your answer faster and how to ask a good question: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=307712&SiteID=1



  • David Griffin

    Another issue could be if you run your application inside of the VB express IDE. What happens is that you start up with a copy of the database inside your project. Every time you start it up which gives the appearance that changes does not stick.

    You will have to publish and install you application to keep the database.



  • Lavanya.R

    You can also solve this problem by changing the 'Copy to Output Directory' property for the database file from 'always' to 'copy if newer'.

    When you hit F5 in a project, VS copies files into the Debug directory based on that property. If you database is set to 'always' you will get a fresh copy of the database from the project directory and overwrite any changes you created during your last debug.

    To Andreas' point, my solution above is for debug and testing your application. If you're to the point where you're using your applciation for actual work, then you should compile, publish and install as he suggests.

    Regards,

    Mike Wachal



  • jimmy_iitd

    Is this a WinForms application Are you using DataSet or DataAdaptor to connect to sql Are you commiting the transaction You need to provide a little bit more information like the name of the controls you are using if this is an app you created, and what API you are using to manipulate the database.

    Temporary tables exist in tempdb. Tempdb gets a clean copy everytime the server restarts. This is expected, and temporary tables have no relationship to tables in another databases unless you write code to propagate changes yourself.


  • SQL Express