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?
--sb--