loadRecords still incompatible with UNION?

Is it still true that

forms[formName].foundset.loadRecords(sqlText, null);

…won’t work if there is a UNION in the sqlText?

Thanks,
Don

Hi Don,

Just tested it in Servoy 6.0.7 and it worked fine for me:

var _sQuery = "SELECT id FROM myTable WHERE id=1 UNION SELECT id FROM myTable where id = 2";
controller.loadRecords(_sQuery, null);
// Result is 2 records in the foundset

Hope this helps.

Hi Robert,

It appears to work for me, too. I asked because there is a tool tip warning in the developer saying that the command “cannot contain ‘group by’, ‘having’, or ‘union’”. I didn’t want to code something that would break down the road.

Thank you,
Don

djlapin:
Hi Robert,

It appears to work for me, too. I asked because there is a tool tip warning in the developer saying that the command “cannot contain ‘group by’, ‘having’, or ‘union’”. I didn’t want to code something that would break down the road.

Thank you,
Don

The documentation is outdated, will be fixed in 6.1.1 .