Click here to Skip to main content
16,020,840 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
When we Exit the project it automatically should take the sql server (2005) as a backup using SMO DLL,

Help me too get out off this
Posted
Updated 6-Sep-11 20:09pm
v3

 
Share this answer
 
v2
Do you mean that when your application closes it should make a backup.

If that's the case, upon closing, you can execute a BACKUP[^] command using SqlCommand[^].

That would result to a backup file which you can then zip if you like. For zipping there are lot's of articles, for example: C# Zip Files and/or Folders[^].

If this is centralized Sql Server (I mean you have multiple clients), it's not a good idea to run backup when an application closes. Instead you should schedule the backup at server side to happen for example every night.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900