Possible Duplicate:
Backup SQL Server via C#
I have a Windows Forms project which is storing some values in SQL Server 2008 R2, I have many tables in there which deals with my application.
I would like to take a database backup so that if the user is to loose the operating system and reinstall, they can restore the database using the backup (.BAK file).
I would like to know how I can take a backup from SQL Server 2008 R2 with C#, and if it's compulsory to install SQL Server in the client computer whilst taking the backup.
Also, how can I restore it? Any examples may help.