Just got this error message and I have no idea why. My code was working perfectly until I added an extra check to make sure a file exists ( If FileExists(Filename) etc). I'm assuming an access violation in something that looks like a major system file isn't a good thing, didn't crash my comp though, so probably not that bad.
I commented out everything except the code below and I still got the error, I'm left thinking "What the hell?"
var
strRemote,strLocal,UpdateText:String;
Remote,Local:TextFile;
Changed:Boolean;
Settings:TIniFile;
begin
Changed := False;
AssignFile(Remote, 'CaSCL.dat');
AssignFile(Local, 'LCaSCL.dat');
If FileExists('CaSCL.dat') then
begin
If FileExists('LCaSCL.dat') then
begin
end
else
Changed := True;
If Changed then
begin
end;
end
else
begin
end;
end;
How can a piece of code I've used hundreds of times do this?
I commented out everything except the code below and I still got the error, I'm left thinking "What the hell?"
var
strRemote,strLocal,UpdateText:String;
Remote,Local:TextFile;
Changed:Boolean;
Settings:TIniFile;
begin
Changed := False;
AssignFile(Remote, 'CaSCL.dat');
AssignFile(Local, 'LCaSCL.dat');
If FileExists('CaSCL.dat') then
begin
If FileExists('LCaSCL.dat') then
begin
end
else
Changed := True;
If Changed then
begin
end;
end
else
begin
end;
end;
How can a piece of code I've used hundreds of times do this?