VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Procedure to back-up database (for MS Access)

by Esmael Telmosa (7 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: VB.NET
Difficulty: Unknown Difficulty
Originally Published: Fri 16th June 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Procedure to back-up database (for MS Access)

API Declarations


Dim CommondialogControl As Control

Rate Procedure to back-up database (for MS Access)




    'CommondialogControl = CommondialogControl
    'Ask the filename of Back-Up
    CommondialogControl.Filter = "Back-Up Files (*.mdb)|*.mdb"
    'Set Default DIR
    CommondialogControl.InitDir = "C:\"
    'Display the SHOWSAVE window
    CommondialogControl.ShowSave

  On Error GoTo Opps
 'If there is an entry
 If CommondialogControl.FileName <> "" Then
    'if already exist then delete the file
    If Dir(CommondialogControl.FileName) <> "" Then Kill CommondialogControl.FileName
    
   ' 'repair database
   '' DBEngine.RepairDatabase "C:\Documents and Settings\allen\Desktop\mitch-barcode\monitoringdbCon.mdb"
    
    FileCopy StrSource, CommondialogControl.FileName
    'Text1.Text = CommondialogControl.FileName
    'Prompt to User that Back_Up is Completed
    MsgBox "Back-Up Complete!", vbInformation, "BACK-UP SUCCESSFUL"
 End If
    Exit Sub
    
Opps:
    MsgBox Err.Description, vbExclamation, "Employee Status System"
    
End Sub


Download this snippet    Add to My Saved Code

Procedure to back-up database (for MS Access) Comments

No comments have been posted about Procedure to back-up database (for MS Access). Why not be the first to post a comment about Procedure to back-up database (for MS Access).

Post your comment

Subject:
Message:
0/1000 characters