- This topic has 3 replies, 3 voices, and was last updated 4 years, 10 months ago by .
Viewing 3 reply threads
Viewing 3 reply threads
- You must be logged in to reply to this topic.
procedure TForm6.btnCreateTableClick(Sender: TObject);
begin
orm.CreateOrUpgradeTable([TPerson,TAccount,TImage{,TBackupImage}]);
end;
[dcc32 Error] Unit1.pas(157): E2001 Ordinal type required
[dcc32 Error] Unit1.pas(157): E2010 Incompatible types: ‘Integer’ and ‘class of TImage’
How to fix it?
Hi,
If I remember it well there where some serious issues in XE5 with generics which are heavily used in the ORM framework. I think you need XE7 or up.
This is a case of XE5 not supporting an implicit creation of an array.
Instead use orm.CreateOrUpgradeTable(TArray<TClass>.Create(TPerson,TAccount,TImage{,TBackupImage}));
Check this site for more info:
https://stackoverflow.com/questions/50994006/how-to-pass-generic-array-as-open-array-parameter-in-delphi
best regards
Kim/C4D
Hello
This code works:
orm.UpgradeTable(TArray<TClass>.Create(TMRDOC,TMRDOCROW));
Thanks
Vadim Mescheryakov