Click here to Skip to main content
15,179,246 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to take database backup from server pc to client pc.
I can save it into server pc. But I can’t not save it into client pc
Is there any one for help?
I am using ,c#
Here is my db backup code
//string Msg = null;
        //string FileName = "E:\\Standard.bak"; // database name
        SQL code: BACKUP DATABASE  standard  TO DISK = '" + FileName + "' ITH FORMAT");

I will use it in web application

Thanks in advance
Updated 17-Oct-11 10:58am

After you back it up to disk, you have to transfer that resulting file to the client. Why in the world would you want to do something like that?
[no name] 17-Oct-11 16:09pm
Because my client wants to backup his db regularly..
This MSDN article Backup Devices[^] has a section called Backing Up to a File on a Network Share.
It talks about using an UNC name for the back-up destination.

You might want to read it and see if you can use it in your situation.

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