public bool BackupCurrentDatabase(string MyDestinationpathAndFile)
{
Access.Application oAccess = ((Access.Application)
(Marshal.GetActiveObject("Access.Application")));
try
{
File.Copy(oAccess.CurrentProject.FullName, MyDestinationpathAndFile);
return true;
}
catch (Exception)
{
throw;
}
finally
{
Marshal.ReleaseComObject(oAccess);
}
Sem comentários:
Enviar um comentário