Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Pass Through issue
Message
From
28/08/2008 16:46:23
 
 
To
28/08/2008 16:36:26
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01342682
Message ID:
01342819
Views:
11
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?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform