Subject | Re: [IBO] TIBOQuery: Can't get SqlOrder.add to work |
---|---|
Author | Helen Borrie |
Post date | 2007-12-15T12:50:45Z |
At 11:30 PM 15/12/2007, you wrote:
The quote below used to be the way it was meant to work...at some point, it worked only if you cleared SQLOrder and then added the entire phrase of the order clause as one string...I believe that was later fixed....but, until now, your statement would fail to prepare if you included the keywords.
So I think we do need Jason to check it over, as to whether this change was intended...for example, it might be now, with Fb 2.0's changes, that the parser doesn't handle that phase quite the way it did before. The GSG hasn't been updated for a very long time...
Sorry I can't be more help here.
Helen
>> I notice you don't clear the SQLOrder array before you apply the newYes, actually, now I do recall that SQLOrder never did work quite like SQLWhereItems, although it was meant to. That is, doing a Clear and then adding the content of the phrases without the syntax elements would not work.
>ordering criteria. Possibly docline.item_order is already in the
>array from the previous prepare?
>>
>I am closing the dataset elsewhere beforehand and the Getting Started
>Guide says
>"SQLOrder.Clear is unnecessary because Prepare will do it
>automatically".
>The code below seems to work. I have also addedIf that works, then well and good for now. I've sent Jason a message about but he has replied that he is ill and will look at it when he feels well enough.
>spaces and commas as necessary, which is not mentioned as necessary in
>the Getting Started Guide.
>Can you confirm that "Order By" must alwaysIt shouldn't; but if that's what it takes to get it to work, then we're looking at either a bug or an undocumented change in the parser. As this hasn't popped up before, it's possibly quite recent. Could you please post the exact version of IBO where you first saw this problem?
>be explicitly added (as in SQLOrder.Add('order by ')), or can this be
>automatically added by the prepare process and am I missing something?
The quote below used to be the way it was meant to work...at some point, it worked only if you cleared SQLOrder and then added the entire phrase of the order clause as one string...I believe that was later fixed....but, until now, your statement would fail to prepare if you included the keywords.
So I think we do need Jason to check it over, as to whether this change was intended...for example, it might be now, with Fb 2.0's changes, that the parser doesn't handle that phase quite the way it did before. The GSG hasn't been updated for a very long time...
Sorry I can't be more help here.
Helen