Thema: Delphi Fehler mit CopyFile?!

Einzelnen Beitrag anzeigen

Grolle

Registriert seit: 5. Nov 2004
Ort: Coesfeld
1.268 Beiträge
 
Delphi 2010 Professional
 
#8

Re: Fehler mit CopyFile?!

  Alt 20. Okt 2006, 21:41
Hi,
habs jetzt nochmal umgeschrieben. Getlasterror sagt: Der Vorgang wurde erfolgreich beendet.
Die Dateien wurden aber nicht kopiert. Hier der relevante Code:
Delphi-Quellcode:
      if SelectDirectory('Bitte Ordner auswählen:', '' ,pfad) then
        begin
          AdsConnection1.IsConnected := false;
          if (copyfile(PChar(pfad +'\adressen.adt'),PChar(ExtractFilePath(ParamStr(0))+ 'daten\adressen.adt'),false)) and
             (copyfile(PChar(pfad +'\ab.ini'),PChar(ExtractFilePath(ParamStr(0))+ 'daten\ab.ini'),false)) and
             (copyfile(PChar(pfad +'\search.ini'),PChar(ExtractFilePath(ParamStr(0))+ 'daten\search.ini'),false)) and
             (copyfile(PChar(pfad +'\user.ini'),PChar(ExtractFilePath(ParamStr(0))+ 'daten\user.ini'),false)) then
            begin
              AdsConnection1.IsConnected := true;
              AdsTable1.Active := true;
              Statusbar1.Panels.Items[1].Text := IntToStr(ADSTable1.recordcount);
              MessageDlg(' Die Wiederherstellung der Datenbank war erfolgreich! ',mtInformation,[mbOK],0);
            end
          else
            begin
              AdsConnection1.IsConnected := true;
              AdsTable1.Active := true;
              Statusbar1.Panels.Items[1].Text := IntToStr(ADSTable1.recordcount);
              MessageDlg(' Fehler bei der Wiederherstellung der Datenbank! ',mtError,[mbOK],0);
            end;
        end;

  Mit Zitat antworten Zitat