Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot assign to a read-only property

I'm trying to change the database and the tablename against a TTable component during run time, however this error keeps appearing at this line:

  E2129 Cannot assign to a read-only property

The code I am trying to use is as follows:

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

The variables in use are strings that have previously been initialised. So yeah if you could help in anyway I would appreciate it :)


1 Answers

your problem is in the Database property which is read-only, you must set the DatabaseName property instead.

like image 117
RRUZ Avatar answered Dec 03 '25 19:12

RRUZ



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!