Click here to Skip to main content
11,804,574 members (73,876 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: VB SQL-Server SQL-Server-2008 , +

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 at 5-Feb-13 4:25am
i am using this in local 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

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

  Print Answers RSS
0 OriginalGriff 3,205
1 Maciej Los 1,950
2 KrunalRohit 1,907
3 CPallini 1,855
4 Richard MacCutchan 1,187

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