Delphi: EReadError with message ‘Property Persistence does Not Exist’

delphiexception

My program written with Delphi 7 compiles OK, but when I run it it gives me the error message:

Project1.Exe raised exception class EReadError with Message 'Property Persistence does Not Exist'. Process Stopped.

This only started after I installed the TMS Component Pack to use with this project. Thanks for any help.

Best Answer

  1. Open the Form in Delphi IDE
  2. Use Alt + F12 to edit the .DFM source
  3. Search the "Persistence" property
  4. Delete the line with "Persistence" property

DFM example:

SomeComponent1 = TSomeComponent
  OtherProperty = OtherValue
  Persistence = True
  AnotherProperty = AnotherValue
end

Also you can use the great DFMCheck 1.4 tool, by Andreas Hausladen. To check any other missing property like that:

http://andy.jgknet.de/blog/?page_id=177

This is most likely caused by the compiled & installed package being out of sync with the actual .pas file. If you have source code then rebuilding the packages will probably fix it.