procedure TShujuku.SpeedButton2Click(Sender: TObject);
begin
  Opendialog1.Title:='选择文件。';
  if OPendialog1.Execute then
   
    Edit2.Text:=opendialog1.FileName;  If Trim(opendialog1.FileName)<>'' then
  begin
    try
      With Data.ADOQuery3 do
      begin
        Data.ADOQuery3.Close;
        Data.ADOQuery3.SQL.Clear;
        Data.ADOQuery3.SQL.Add('use master restore headeronly from disk='''+edit2.text+'''');
        Data.ADOQuery3.Open;
      end;
      Data.ADOQuery3.Last;
      Cou:=trim(Data.ADOQuery3.Fields.Fields[5].AsString);
    While not Data.ADOQuery3.bof do
      begin
            Data.ADOQuery3.Prior;
      end;
    except
      Application.MessageBox('错误!','提示',mb_ok);
    end;
  end;  if Edit2.Text = '' then
    begin
      Showmessage('您已经取消数据库恢复!');
      exit;
    end;
  with Data.ADOConnection2 do
  begin
    try
      ADOCommand1.CommandText:='use master';
      ADOCommand1.Execute;
      ADOCommand1.CommandText:=' alter database ZLManager set offline with rollback immediate';
      ADOCommand1.Execute;
     ADOCommand1.CommandText:='restore database ZLManager from disk= '''+edit2.Text+''' with recovery ';
      ADOCommand1.Execute;
      ADOCommand1.CommandText:=' alter database ZLManager set online with rollback immediate';
      ADOCommand1.Execute;
      ADOCommand1.Cancel;
      MessageBox(handle, '数据库恢复成功!', '提示',  mb_IconWarning + mb_Ok);
      application.Terminate;
    except
    on e:exception do
      begin
      showmessage('数据库恢复失败,请重新恢复!'+e.Message);
      end;    end;
end;
end;
上面的程序,运行后
提示“数据库恢复成功!”
但再单击其他模块时,
就提示类似的信息:对象名'SutentInfo '无效  ( SutentInfo为学生信息模块中用到的表)
这问题该如何解决?  欢迎回帖,有实用的备份还原程序非常欢迎!