Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi

I wrote the below code for taking the backup

VB
If str = "backup" Then
               SaveFileDialog1.FileName = cmbdatabase.Text
               SaveFileDialog1.ShowDialog()
               Timer1.Enabled = True
               ProgressBar1.Visible = True
               Dim s As String
               s = SaveFileDialog1.FileName
               query("backup database " & cmbdatabase.Text & " to disk='" & s & "'")



But when i m selecting the location using file dialog, it's not creating any backup file

Please tell me the problem.

Thank you
Posted

1 solution

The backup path should be a valid path on the server and not on the client (you are giving a client side path), the backup command is executed on the server.
 
Share this answer
 
Comments
[no name] 5-Feb-13 4:25am    
i am using this in local system.how to set the path then for this.
Mehdi Gholam 5-Feb-13 5:24am    
You can't backup to your local system directly, you must back up to the server drives then copy to your local system.
[no name] 5-Feb-13 5:32am    
r u talking about sql database backup..???
Mehdi Gholam 5-Feb-13 5:46am    
Yes

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