Autor Beitrag
LowSkills
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 111

Windows XP
Delphi 6 Professional
BeitragVerfasst: Mi 13.06.07 18:19 
Halli hallo...

Wieder mal etwas ganz banales. Oder auch nicht. Jedenfalls steh ich auf dem Schlauch.

Was läuft hier schief?
ausblenden Delphi-Quelltext
1:
CopyFile(Form1.OpenDialog_Tarif_102.Files.GetText,'C:\Tarif102.mdb',FALSE);					


Keine Fehlermeldung, kein anmeckern beim Compilieren... Er tut einfach nichts...

Na ja, ist ja nichts neues...

Jemand ne Idee?

Und wo wir gerade mal dabei sind, mein lieblingsthema:

ausblenden Delphi-Quelltext
1:
CopyFile(Form1.OpenDialog_Tarif_102.Files.GetText,'GetSpecialFolder($26)+'\Power Tools\Tarif102.mdb',FALSE);					


So meckert der Compiler rum.
Klar, string./.char oder so, das Ding hab ich ja schonmal verpeilt.

Wers checkt, bin für jede Antwort dankbar!

Heagdl!

Hihi :)

_________________
Verstand ist eines der am besten verteilten Güter. Jeder denkt, er hätte genug davon.
Kein Problem widersteht lange dem Angriff beharrlichen Denkens.
Calculon
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 676

Win XP Professional
Delphi 7 PE, Delphi 3 PRO
BeitragVerfasst: Mi 13.06.07 18:22 
Probier's mal mit:

ausblenden Delphi-Quelltext
1:
CopyFile(Form1.OpenDialog_Tarif_102.Filename,'C:\Tarif102.mdb',FALSE);					


Gruß

Calculon
--
LowSkills Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 111

Windows XP
Delphi 6 Professional
BeitragVerfasst: Mi 13.06.07 18:27 
ausblenden Delphi-Quelltext
1:
Error: PowerReceiver.pas(666): Incompatible types: 'TFileName' and 'PChar'					


leider nein...

noch jemand ne idee?

:)

Vielleicht liegts ja an der Zeile... 666... böse böse ;)

_________________
Verstand ist eines der am besten verteilten Güter. Jeder denkt, er hätte genug davon.
Kein Problem widersteht lange dem Angriff beharrlichen Denkens.
Calculon
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 676

Win XP Professional
Delphi 7 PE, Delphi 3 PRO
BeitragVerfasst: Mi 13.06.07 18:30 
Versuch's mal mit:

ausblenden Delphi-Quelltext
1:
CopyFile(PChar(Form1.OpenDialog_Tarif_102.Filename),PChar('C:\Tarif102.mdb'),FALSE);					

Gruß

Calculon
--

:mrgreen:
LowSkills Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 111

Windows XP
Delphi 6 Professional
BeitragVerfasst: Mi 13.06.07 18:37 
Und wieder nichts. Keine Fehlermeldung, kein Compiler-Vorwurf...

Der nächste Bitt!?

:)

_________________
Verstand ist eines der am besten verteilten Güter. Jeder denkt, er hätte genug davon.
Kein Problem widersteht lange dem Angriff beharrlichen Denkens.
Calculon
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 676

Win XP Professional
Delphi 7 PE, Delphi 3 PRO
BeitragVerfasst: Mi 13.06.07 18:43 
Komisch

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
procedure TForm1.Button1Click(Sender: TObject);
var
von, nach: string;
begin
if opendialog1.Execute then
  begin
    von := opendialog1.FileName;
  end;
if savedialog1.Execute then
  begin
    nach := savedialog1.FileName;
  end;
Copyfile(PChar(von),PChar(nach), true);
end;


Hab' ich grad' ausprobiert und funzt wunderbar!
LowSkills Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 111

Windows XP
Delphi 6 Professional
BeitragVerfasst: Mi 13.06.07 19:09 
ausblenden Delphi-Quelltext
1:
2:
3:
    von := OpenDialog_Tarif_102.FileName;
    nach := GetSpecialFolder($26)+'\Power Tools\Tarif102.mdb';
    Copyfile(PChar(von),PChar(nach), false);


Na ja, was soll ich sagen?

Danke. ;)

Habs grad auch ausprobiert und es funzt wunderbar. Warum das vorher nicht funktioniert hat, kann mir aber vermutlich keiner sagen?

Danke, Calculon. Du hast mir den Tag gerettet...

*freu*

_________________
Verstand ist eines der am besten verteilten Güter. Jeder denkt, er hätte genug davon.
Kein Problem widersteht lange dem Angriff beharrlichen Denkens.
Calculon
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 676

Win XP Professional
Delphi 7 PE, Delphi 3 PRO
BeitragVerfasst: Mi 13.06.07 19:20 
Jetzt würd' ich mal unter 'C:\' nachschauen, da müsste 'Tarif102.mdb' theoretisch auch rüberkopiert worden sein bei deinen Versuchen ;-)

Gruß

Calculon
--