Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Command line length 8,192
Message
De
14/07/2014 14:32:49
Mike Yearwood
Toronto, Ontario, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01603641
Message ID:
01603661
Vues:
62
>>I agree it seems to be something other than command line length, except that even when there is no syntax error in the concatenated string, it generates a syntax error after exceeding a certain length.
>
>I was suspecting SET MEMOWIDTH was at play here, inserting a soft carriage return and thus screwing the command, but even after changing it to 8192 the problem remains. I even tried to generate the command like this:
>
>
>replace csrTest.cField1 with 'abc',;
>csrTest.cField1 with 'abc',;
>...
>csrTest.cField1 with 'abc';
> in csrTest
>
>
>but it also fails after certain length and I cannot see why...
>
>Maybe you should change your strategy and work with an object from scatter name, changing its properties values in the scan loop and then gather name?

That would be painfully slow. What we ended up doing was breaking the replace command every 2,000 chars. That way as many fields are updated at once as possible. I know I've built massive SQL well beyond 2000 chars without this problem.

I have seen building SQL with embedded semicolons cause a syntax error, and removing them either programmatically before the macro or not adding them manually in the first place not have the error. Why is the length different depending on the alias and/or field names too?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform