Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi
 
I wrote the below code for taking the backup
 
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 4-Feb-13 23:10pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Snehasish Nandy at 5-Feb-13 4:25am
   
i am using this in local system.how to set the path then for this.
Mehdi Gholam at 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.
Snehasish Nandy at 5-Feb-13 5:32am
   
r u talking about sql database backup..???
Mehdi Gholam at 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)



Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 5 Feb 2013
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