Description:-
This error
comes when you try to add new DataSource to the top of the query.
You should add new table to the Main DataSource instead.
QueryBuildDataSource qbds;
qbds = query.addDataSource(tableNum(newTable)); //This is wrong
You should add new table to the Main DataSource instead.
query.dataSourceTable (tableNum (newTable)).addDataSource (...)// This is correct
Thanks for comments.....