Subject RE: [IBO] TIBOQuery: Can't get SqlOrder.add to work
Author Paul Hope
Pretty sure SQLOrder should include 'Order By'

Paul

> -----Original Message-----
> From: IBObjects@yahoogroups.com
> [mailto:IBObjects@yahoogroups.com] On Behalf Of mitch_landor
> Sent: 14 December 2007 12:57
> To: IBObjects@yahoogroups.com
> Subject: [IBO] TIBOQuery: Can't get SqlOrder.add to work
>
> 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
>
>
>
> ______________________________________________________________
> _____________
> IB Objects - direct, complete, custom connectivity to
> Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ______________________________________________________________
> _____________
> http://www.ibobjects.com - your IBO community resource for
> Tech Info papers,
> keyword-searchable FAQ, community code contributions and more
> !
> Yahoo! Groups Links
>
>
>