Try
Dim sDBFile As String = "SERVER PATH"
Dim sBackUpFile As String = "D:\BACKUP"
If Not System.IO.Directory.Exists(sBackUpFile) Then
System.IO.Directory.CreateDirectory(sBackUpFile)
End If
b = a
c1 = Now.ToLongTimeString
d = c1
c1 = c1.Replace(":", "")
c1 = c1.Replace(" ", "")
d = c1
sBackUpFile &= "\ABC.mdb"
If File.Exists(sDBFile) Then
Dim db As New OleDb.OleDbConnection
FileCopy(sDBFile, sBackUpFile)
End If
If File.Exists(sBackUpFile) Then
File.Delete(sBackUpFile)
File.Copy(sDBFile, sBackUpFile, True)
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
MsgBox("Backup of INTELPAT database was backedUp successfully !" & vbCrLf & "This Backup can bi found in D:\BACKUP\ABC_today'sdate.mdb ", MsgBoxStyle.Information + MsgBoxStyle.OkOnly, )
This code will copy entire database....:)