LoadFromFile
originally the code was:
Report.LoadFromFile('C:\SimpleLandlord\ReportFiles\' + ReportName + '.fr3');
and was working. Something must have changed because this code starting getting:
Debugger Exception Notification
Project SimpleLandlord.exe raised exception class EOSError with message 'System Error. Code: 5.
Access is denied'.
Break Continue Help
So I changed it to:
to make sure the file is readable, but I still get the same message. Any ideas. Or anything I should try.
BTW. I have rebooted, and tried running as admin.
Report.LoadFromFile('C:\SimpleLandlord\ReportFiles\' + ReportName + '.fr3');
and was working. Something must have changed because this code starting getting:
Debugger Exception Notification
Project SimpleLandlord.exe raised exception class EOSError with message 'System Error. Code: 5.
Access is denied'.
Break Continue Help
So I changed it to:
  aReportFile := 'c:\temp\' + ReportName + '.fr3';
  if (FileExists(aReportFile)) then
  begin
    attrs := FileGetAttr(aReportFile);
    if attrs and 1 > 0 then
      MessageDlg('Read only', mtInformation, [mbOK]);
    Report.LoadFromFile(aReportFile);
  end;
to make sure the file is readable, but I still get the same message. Any ideas. Or anything I should try.
BTW. I have rebooted, and tried running as admin.
Comments