I tested with only "date" and VFP gets back at me saying that the field name is not precise enough. I looked at my interrogation and I didn't see another place where I select a "date" field. Unless VFP considers "date" to be a reserved word.
At least I've got a fix to make my app work but still this one bugs me and I'd like to understand what's going on here.
update : then again my order with MeaningfullNameForDate works in my short select but not in my big select.
>Silly question: does it work if the name is shorter? Such as mydate instead of MeaningfullNameForDate? have you tested it?
>
>
>>The limit of 8192 is not exceeded
>>The field is a date field
>>That field is one of the fields selected
>>the order clause specifies the name of the field and not a numeric position
>>
>>Additional info: In my select I do this
>>
>>select date as MeaningfullNameForDate...
>>
>>and the order is with MeaningfullNameForDate. That should'nt be a problem should it?
>>
>>
>>>Is it possible that you exceed VFP command limit of 8192 charaters?
>>>
>>>>I build a rather long SQL interrogation. After everything is in there I want to order it. I receive the error message mentioned in the thread title.
>>>>
>>>>I have'nt been able to find what's wrong beside that interrogation being long (over 4000 characters).
>>>>
>>>>But I really don't think it's the problem
>>>>
>>>>So as a quick fix I did my interrogation. Stored it in a temporary cursor. After that I built my real cursor and ordered this one. Everything went fine.
>>>>
>>>>Here's what I mean:
>>>>
>>>>
>>>>select field1, field2, field3 from WhateverTables into cursor TmpCurs
>>>>
>>>>select * from TmpCurs order by OrderNeeded into cursor NeededCurs
>>>>
>>>>
>>>>Anyone can tell me why I had to do this?
*******************************************************
Save a tree, eat a beaver.
Denis Chassé