R
rev
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TRestoreFrm.BitBtn1Click(Sender: TObject);
var
ss:string;
begin
with maindm do begin
ss:='Restore database '+adocon.DefaultDatabase+' from disk=''';//adocon是ADOCONNECTION控件
// try
if OpenDialog1.Execute then
begin
ss:=ss+OpenDialog1.FileName+'''';
adocmd.CommandText:=ss; //adocmd是ADOCOMMAND控件
adocmd.Execute;
Application.MessageBox(
'数据恢复成功!',
'提示',
MB_OK + MB_ICONinformation);
end;
//except showmessage('操作失败请重新恢复!');
//end;
end;
end;
执行数据库恢复时提示,“未获得数据库操作排它性”,如何改?
var
ss:string;
begin
with maindm do begin
ss:='Restore database '+adocon.DefaultDatabase+' from disk=''';//adocon是ADOCONNECTION控件
// try
if OpenDialog1.Execute then
begin
ss:=ss+OpenDialog1.FileName+'''';
adocmd.CommandText:=ss; //adocmd是ADOCOMMAND控件
adocmd.Execute;
Application.MessageBox(
'数据恢复成功!',
'提示',
MB_OK + MB_ICONinformation);
end;
//except showmessage('操作失败请重新恢复!');
//end;
end;
end;
执行数据库恢复时提示,“未获得数据库操作排它性”,如何改?