jaisu_krish
asked on
Backup for Access database using VB6
Hi,
I want to take backup of Access database using VB.Is it possible?If yes, tell me how?
jaisu_krish
I want to take backup of Access database using VB.Is it possible?If yes, tell me how?
jaisu_krish
ASKER
Hi,
This one is not working..
jaisu_krish
This one is not working..
jaisu_krish
What's not working ? Are you using vb or vba ?
Through VBA:
Private Sub Backup()
Dim Fs As Object
Dim a
Set Fs = CreateObject("Scripting.Fi leSystemOb ject")
a = Fs.CopyFile("c:\the path to yourDB.mdb", "c:\the path to backup file.mdb", True)
End Sub
Private Sub Backup()
Dim Fs As Object
Dim a
Set Fs = CreateObject("Scripting.Fi
a = Fs.CopyFile("c:\the path to yourDB.mdb", "c:\the path to backup file.mdb", True)
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
(in vb:
dim strFileNameOriginal as string
dim strFileNameBackup as string
strFileNameOriginal = "c:\YourPath\YourDatabase.
strFileNameBackup = "c:\Backup\YourDatabase.md
FileCopy strFileNameOriginal, strFileNameBackup
Otherwise, you can take a look at:
With the help of this tool you can take backup of your MS-Access files and also restore the files.
With Auto backup facility and more. Try it.
http://www.a1vbcode.com/download.asp?ID=3252