Is data backup and restore functionality possible in SQL Server Compact 3.5 SP2 edition ?
I have developed and installed a C# desktop application which is working perfectly. My app can store and manipulate data.
Now I want to backup that data stored in the SQL Server Compact 3.5 SP2 which is embedded to my application. I also want to produce reports from the data already stored.
Can anyone say:
IS IT POSSIBLE OR NOT ? IF POSSIBLE CAN YOU , PLEASE, GIVE ME A LINK OF WALK THROUGH TO DO THAT.
Thank You
According to MSDN, you just copy the file to make a backup, and same for a restore. You can view the documentation here . It's at the very bottom of the page.
The code is really easy:
System.IO.File.Copy(sourceFileName, destFileName);
Here's another SO post about this topic which will tell you that you have to not be using the .sdf file when you backup / copy else it'll be locked.
Good Luck!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.