这是Delphi的一个缺陷。但是,你可以使用某些数据库自带的数据备份功能,如SQL Server中可以:
with Query1 do
begin
Close;
SQL.Clear;
SQL.Add('backup database 数据库name to disk= 磁盘路径');
Prepared;
try
ExecSQL;
showmessage('备份成功!');
except
showmessage('备份失败,请与管理员联系!');
end;
Close;
end;
with Query1 do
begin
Close;
SQL.Clear;
SQL.Add('backup database 数据库name to disk= 磁盘路径');
Prepared;
try
ExecSQL;
showmessage('备份成功!');
except
showmessage('备份失败,请与管理员联系!');
end;
Close;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货