Click here to Skip to main content
13,089,943 members (48,348 online)
Rate this:
Please Sign up or sign in to vote.

I wrote the below code for taking the backup

If str = "backup" Then
               SaveFileDialog1.FileName = cmbdatabase.Text
               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 22:10pm

1 solution

Rate this: bad
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.
Snehasish Nandy 5-Feb-13 4:25am
i am using this in local 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.
Snehasish Nandy 5-Feb-13 5:32am
r u talking about sql database backup..???
Mehdi Gholam 5-Feb-13 5:46am

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.170813.1 | Last Updated 5 Feb 2013
Copyright © CodeProject, 1999-2017
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