Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Pass Through issue
Message
 
 
À
28/08/2008 16:36:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01342682
Message ID:
01342818
Vues:
11
Old habits die hard or you can not teach a dog a new trick :)

Make your pick :)

>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.
>
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform