-
Backing up SQL DB
Hi Guys,
It's been so long since i posted here!
Anyway, how can i backup an SQL databse with VB?
Right now I do it manually, i open a new db.mdb, and select insert external data, choose my sql odbc, and it download all my data to an access mdb!
But i need to do it with code!
any help is appreciated!
tx
-
If you want to do a real database backup run the following SQL statement through ADO or ODBC
BACKUP DATABASE <DBNAME>
TO DISK='C:\dbname.bak'
WITH INIT
That will create a backup of the database that can be retored using an equivalent restore statement.
-
tx london,
I forgot to mention that my database is not on my local machine!
it's at a remote location!
sorry!
what i'm thinking so far(which i hope that not my last resort), i to create a mdb with code, then create each table, then download all the data in the respective tables, but...