Subject TIBOQuery: Can't get SqlOrder.add to work
Author mitch_landor
I've never used SQLOrder.Add before and I can't understand why this
SQL will work in my TIBOQuery:
'ORDER BY docline.ITEM_NO_CHARGE_TO_CLIENT,
costtype.costtype_sortorder, loc.loc_sortorder, loc.loc_name,
docline.item_order'

but when I try to use SQLOrder.Add I get the error message shown below

procedure TfrmDocument.qryEstimateDataPrepareSQL(Sender: TObject);
begin
with qryEstimateData do
begin
//Set the sort order
SQLOrder.Add('docline.ITEM_NO_CHARGE_TO_CLIENT');
SQLOrder.Add('costtype.costtype_sortorder');
SQLOrder.Add('loc.loc_sortorder');
SQLOrder.Add('loc.loc_name');
SQLOrder.Add('docline.item_order');
end;
end;

ISC ERROR MESSAGE:
Dynamic SQL Error
SQL error code = -104
Token unknown - line 29, column 1
docline

STATEMENT:
TIBOInternalDataset:
"<TApplication>.frmDocument.qryEstimateData.IBOqrqryEstimateData."
'.

Can anyone suggest why this is not working please?
Thanks
Mitch