Create backup of db in vb code

szymek_d

Registered User.
Local time
Yesterday, 22:32
Joined
May 26, 2005
Messages
21
Hi guys.

I'm trying to create a backup copy of my database in vb. So user can click on a button to create the backup copy instead of going into tools and utilities.

I'm trying to do it by compaciting the database.

< DBEngine.CompactDatabase source, destination >

Where source is path to my database, and destination is path to the destination of the backup file.
So my problem is, I get message "You are attempting to open a database that is already opened exclusively by user 'Admin' on machine.... Try again when the database is available."
Is there a way in vb to close current db perform the operation as stated above and open the current db?
Any comment or advice will be greately appreciated.
Thank you in advance.
 
Works like a charm!

I really appreciate your help. And next time i wont give up searching this forum, as it appears that we can get all our questions answered by thoroughly searching this forum!
 

Users who are viewing this thread

Back
Top Bottom