Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ADO.NET
Hello friends
 
i have a project where i used a local database
the ConnectionString is this "Data Source=|DataDirectory|\Database.sdf"
 
i want to know how can a tack back of this file using c# code and also again restore the back up file in to the windows application .
 
please help me.
 
Thanks
Posted 11-Nov-12 2:00am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

With an SDF file, the easiest way is just to copy it - an SDF file is self contained, and just taking a copy using either File.Copy or the file system will be fine. Just make sure you aren't using it at the time! Laugh | :laugh:
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Click this below link its clearly show step by step with screen shot for Take Full Backup of a Database Using SQL Server Management Studio
 
http://www.mytechmantra.com/LearnSQLServer/How-to-Backup-Database-SQL-Server-P1.html[^]
 

This is good and quick one mostly no need for any other way its my personal advise!!!
 
[edit]unnecessary code block removed and clickable link[/edit]
  Permalink  
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 475
1 OriginalGriff 280
2 BillWoodruff 230
3 CPallini 220
4 ChauhanAjay 149
0 OriginalGriff 6,609
1 Sergey Alexandrovich Kryukov 6,240
2 CPallini 5,180
3 George Jonsson 3,574
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 11 Nov 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100