Rich, thanks for the FYI on this, I "Should" remember this in the future. And THANK YOU Michel Fournier for "The Thread"
>You've gotten some advice on better ways to try to create your query. However, To answer your specfic question about why you get ""Command contains unrecognized phrase/keyword."
>
>This is the message when you try to work with a single string value longer than 255. While you can use the line continuation semi-colon to break it up, the end result is still a single string. So
>? "asdfasdfasf;
>1234567"
becomes
>? "asdfasdf1234567"
>extend that several lines and you can see how the 255 limit is exceeded.
>
>That's one of the reasons Text/EndText is a better method. As a FoxPro dinosaur, and despite the fact that I know there are better ways, I'm more comfortable using the old fashioned
>? SQLPREPARE(m.nConnectionHandle,;
> "SELECT TOP 100 PERCENT " +;
> "cast(dbo.EmployeeHours.EmployeeId as TinyInt) as EmployeeID, " +;
> "RTRIM(dbo.EmployeeList.FirstName) + ' ' + RTRIM(dbo.EmployeeList.LastName) AS Name," + ;
> "more" +;
> "etc"
>
>
>which is essentially the same as what you did, except the concatenation prevents the error.
>
snip...
Thanks
Jon
Non-MVP Non-MCP Non-MCSE
Visual FoxPro, What else is there?