My Question
How to backup data in mssql 2000 server from my program
(Delphi 7)You'll want to look into SQLDMO (COM) which will allow you to perform everything you can do with Enterprise Manager.
There are also commands that you can execute to run backups, such as:
mdbConnection.Execute "BACKUP DATABASE " & database_name & "TO DISK = " & db_location_string & " WITH NOINIT , NOUNLOAD , NAME = " & database_name & ", NOSKIP , STATS = 10, NOFORMAT"
Not sure of the syntax for Delphi for executing SQL commands (this is an VB-ADO example).
The COM approach will be nicer from a programming perspective (OO), but the db command might be easier.
No comments:
Post a Comment