VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Backup and Restore

by Christopher (3 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Fri 3rd November 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Backup and Restore

API Declarations


Dim source As String, desti As String



Rate Backup and Restore



On Error GoTo err
    Dim source As String, desti As String
    source = App.Path & "\Biblio.mdb"
    
    With CommonDialog1
        .DialogTitle = "Backup"
        .Filter = "mdbfles (*.mdb)|*.mdb"
        .ShowSave
        desti = .FileName
    backfile.CopyFile source, desti, True
    MsgBox "Databas has been backup", vbInformation
    End With
Exit Sub
err:
Beep
    
End Sub

Private Sub Command2_Click()
On Error GoTo err
    desti = App.Path & "\Biblio.mdb"
With CommonDialog1
    
    .DialogTitle = "Restore"
    .Filter = "Access Files(*.mdb)|*.mdb"
    .ShowOpen
    source = .FileName
End With
backfile.CopyFile source, desti, True
Exit Sub
err:
Beep
End Sub


Download this snippet    Add to My Saved Code

Backup and Restore Comments

No comments have been posted about Backup and Restore. Why not be the first to post a comment about Backup and Restore.

Post your comment

Subject:
Message:
0/1000 characters