Autor Beitrag
foxy
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 814

Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
BeitragVerfasst: Mo 17.02.03 11:33 
guden

also ich hab ein blödes Prob ... da ich irgendwie keinen Fehler finde, poste ich einfach ma ob ihr da einen auf anhieb findet

also meine function sieht so aus
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
function GetDateiDatum(const aName:String):String;
var fh     :THandle; 
    fdata  :TWin32FindData; 
    ft, wt :TFileTime; 
    st     :TSystemTime;
begin 
  Result:=''; 
  fh:=FindFirstFile(PChar(aName), fdata); 
  if (fh<>Invalid_Handle_Value) then 
  begin 
    ft:=fdata.ftLastWriteTime; 
    FileTimeToLocalFileTime(ft, wt); 
    FileTimeToSystemTime(wt, st);
    with st do Result:=Format('%0.2d.%0.2d.%0.4d', [wDay, wMonth, wYear]); 
  end;
  Windows.FindClose(fh); 
end;


diese function rufe ich so auf in der formclose
ausblenden Quelltext
1:
Mem :=GetDateiDatum(ExtractFilePath(ParamStr(0))+'\db\Firmendata.gdb');					


schreibe diese dann in eine .ini

ausblenden Quelltext
1:
2:
3:
4:
5:
ini := TIniFile.Create(ExtractFilePath(ParamStr(0))+'VarIni.ini');
  try
    Ini.WriteString('Variablen','Dateidatum',mem);
finally
 ini.Free;


nur irgendwie gibt der mir das falsche datum ... :/

_________________
"Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 17.02.03 12:17 
Was bekommst du denn für ein Datum?
foxy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 814

Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
BeitragVerfasst: Mo 17.02.03 13:08 
hi ich hab ma alles überprüft und mir ist ein fehler unterlaufen.... aber nicht im code sondern in der anwendung ...
d.h. die datei die ich überprüfe, ist ja die dbDatei, ich habe angenommen, dass diese verändert wird , wenn ich einen Datensatz einfüge oder entferne ... aber dies ist nicht so, also muss ich auch nicht nach dem Datum suchen, als es verändert wurde, sondern nach dem wann der lezte zugriff war.... :( da muss ich mir nun wieder neuen code asudenken ... oder hast du gerade ein vorschlag

_________________
"Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Mo 17.02.03 13:12 
ftLastAccessTime ???
foxy Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 814

Ubuntu, Gentoo
C++, PHP, Java, Ruby, Perl (Eclipse)
BeitragVerfasst: Mo 17.02.03 13:15 
:rofl: kein comment ;)
thx

_________________
"Only wimps use tape backup: real men just upload their important stuff on ftp, and let the rest of the world mirror it." (Linus Torvalds)
OperatingSystem Laptop (Ubuntu Hardy)