Delphi - Using TMSTable with a SQL JOIN Statement results in error
Posted: Mon 15 Oct 2018 11:32
After calling "Edit" on our Table it throws the error that a readonly Dataset can't be modifed.
The problem only occurs, if we have a JOIN in our statement.
In version 7.3.16 everything worked just fine.
With the newest version for Delphi 10.2 it doesn't. (8.1)
Thanks in regards
B.T.
The problem only occurs, if we have a JOIN in our statement.
Code: Select all
TMyOwnTable = class(TMSTable)
...
var
table: TMyOwnTable;
sqlStatement: TStringList;
...
sqlStatement.Add('SELECT TOP 100 master.* FROM (SELECT master.*, n2.Description AS Descr2 FROM MYTABLE master ');
sqlStatement.Add('LEFT JOIN MYTABLE n2 ON master.JOINCOLUMN = n2.JOINCOLUMN) master');
table.TableName := 'MYTABLE';
table.UpdatingTable := 'MYTABLE';
table.SQL.Assign(sqlStatement);
table.Open;
table.Edit;
With the newest version for Delphi 10.2 it doesn't. (8.1)
Thanks in regards
B.T.