Click here to Skip to main content
Rate this: bad
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 23: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 Maciej Los 495
1 OriginalGriff 400
2 Sergey Alexandrovich Kryukov 394
3 CHill60 320
4 Sascha Lefévre 269
0 Sergey Alexandrovich Kryukov 10,017
1 OriginalGriff 9,495
2 Peter Leow 5,241
3 Kornfeld Eliyahu Peter 3,373
4 Maciej Los 3,076

Advertise | Privacy | Mobile
Web01 | 2.8.150327.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