backup the db remotely via vb6

Backup the database from remotely

Sometime users will need to send us their backup so we can review their data or fix it. It has been done for years using MS Access and we are now migrating over to MS SQL.  Is it there syntax or something that I can write in VB6 to copy the database to the user machine then zip it up? In the past all we had to do was zip up the mdb file and this was possible because mdb file has to be in shared folder out on the server.


I am open to any suggestions.
LVL 5
lunchbyteAsked:
Who is Participating?
 
sybeCommented:
Create a share on the server where the backups are created, and users can get it from there. You have it in a file (just like the Access file), and you knew how to deal with that. Use the same procedure.
0
 
sybeCommented:
You can create a backup of a SQL Server by running a TSQL command:

sSQL = "BACKUP DATABASE [databasename] TO DISK='C:\temp\backup.bak'"
Connection.Execute(sSQL), , 128


0
 
lunchbyteAuthor Commented:
That backup the db on the server but I need it to backup on the local computer.
0
 
Anthony PerkinsCommented:
In general, it is not recommended to backup (not to mention difficult to accomplish) using the standard SQL Backup.  You are better off doing a backup to the server and then copying the backup to the local drive.  Assuming you have permissiong, that is.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.