Cannot set read-only property

I am trying to change the database and tab name to the TTable component at runtime, however this error continues to appear on this line:

  E2129 Cannot assign to a read-only property

The code I'm trying to use is as follows:

  tblDest.Database  := lvDestAlias;
  tblDest.TableName := lvDestAlias;

The variables used are strings that were previously initialized. So yes, if you could help anyway, I would appreciate :)

+3
source share
1 answer

your problem is in the Databaseread-only property you must set DatabaseName.

+5
source

All Articles