|
-
Feb 7th, 2003, 09:55 AM
#1
Thread Starter
Frenzied Member
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
-
Feb 7th, 2003, 10:12 AM
#2
Lively Member
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.
-
Feb 7th, 2003, 10:14 AM
#3
Thread Starter
Frenzied Member
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...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|