62,271
社区成员
发帖
与我相关
我的任务
分享
/// 备份数据库,mdb1,源数据库绝对路径;
///mdb2: 目标数据库绝对路径
public void Backup(string mdb1, string mdb2)
{
if (!File.Exists(mdb1))
{
throw new Exception("源数据库不存在");
}
try
{
File.Copy(mdb1, mdb2, true);
}
catch (IOException ixp)
{
throw new Exception(ixp.ToString());
}
}