locked
After publishing my vb 2008 application where is my database? RRS feed

  • Question

  • In VB 2008, I added Microsoft SQL Server Compact 3.5 database.  I have added also some tables, then added data direct to the tables.

    After database designing and adding some data to it, I added windows forms (bound) desired for my project.

    After finishing my interface, I run the application. The data that I previously added directly to table are still there.  I then tried adding data through the forms I made.

    Believing everything works perfectly, I build and publish it locally (in my machine only).  I run the setup file generated after publishing, and then test the project.  The data that I added directly to the table and the data I added through the forms are still intact.  Due to curiousity, I was looking for the file where these data are actually stored.  I checked the database file (.sdf) that I previously created.  I opened it in VB 2008 express edition and to my surprise, it only contains the data I added directly to the table.  Those data I added through the forms, before and after publishing it were gone.  I run again the application (the published one), all the data are there.

    Where is my database?

     

    • Moved by liurong luo Friday, October 29, 2010 8:14 AM a more proper forum. (From:ADO.NET Entity Framework and LINQ to Entities)
    Wednesday, October 27, 2010 12:03 PM

Answers

  • Hello jovito,

    I'm moving this thread from data platform forum to clickonce and deployment forum since there are more experts here for deployment issues.

    Thanks


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by jovito Monday, November 1, 2010 5:39 PM
    Friday, October 29, 2010 8:16 AM

All replies

  • Hi,

    Database changes/transactions are saved in the database log file (transaction log) and not in the database itself. Go to this link for further details: http://en.wikipedia.org/wiki/Transaction_log


    Gil Fink
    Wednesday, October 27, 2010 2:06 PM
  • Thanks for your reply sir.

    These are the files generated after I published and run the setup.

    1.) VerDB.sdf.deploy

    2.) ProjVer.application

    3.) ProjVer.exe.config.deploy

    4.) ProjVer.exe.deploy

    5.) ProjVer.exe.manifest

    I tried renaming VerDB.sdf.deploy to VerDB.sdf and then add as database connection in VB 2008, but not all data are there.

    Please note that I am not trying to recover lost data because the data still intact when I run the application.  I am only looking for the database file where this data are actually stored because there is a chance that I might use the same data or database in another application.

    Please help.

    Wednesday, October 27, 2010 3:12 PM
  • Hello jovito,

    I'm moving this thread from data platform forum to clickonce and deployment forum since there are more experts here for deployment issues.

    Thanks


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
    • Marked as answer by jovito Monday, November 1, 2010 5:39 PM
    Friday, October 29, 2010 8:16 AM
  • found it.

    AppData\Local\Apps\2.0\Data\M2NG1WY7.YJ4\OLV78596.X14\proj..tion_33a6e7ba637f34df_0001.0000_1db8f049b525c417\Data\

    why is it stored in a weird folder?

    Monday, November 1, 2010 5:39 PM