Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I avoid 'SQL: Statement too long (Error 1812)'
Message
De
13/11/2003 09:14:26
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00849187
Message ID:
00849486
Vues:
32
Hi Sergey,

I don't know how to cut and paste the contents of the string variable. It appears that VFP won't let you do so from the debugger if the contents of the variable is "too long"?

Anyway, it goes something like this:
SELECT DISTINCT A.FIELD1, A.FIELD2 AS MYFIELD1, B.FIELD1, 'TEST' AS MYFIELD2

FROM TABLE1 A, TABLE2 B WHERE !DELETED("TABLE1") AND A.FIELD3=B.FIELD2 AND

A.FIELD4=1234 OR A.FIELD4=2345 OR A.FIELD4=3456 OR A.FIELD5=4567 OR ...
As you can see, the length of the SQL statement depends on the last part where table a.field4 is being compared to different values repeatedly. The actual syntax is not the problem since it executes without any problems if the latter contains only a "few" comparisons.

As I've said in my last message, the total length of the string variable is only 1844 chars yet VFP complains it is "too big".

Mike


>Can you post the select statement that generates an error. The VFP limits are documented in Visual FoxPro System Capacities in the help.
>
>>Thanks for the reply Sergey.
>>
>>My string is only 1844 characters and I get the error. Any ideas as to why? Where is it documented that a VFP statement cannot be > 8192 chars?
>>
>>Mike
>>
>>>The lenght of any VFP statement cannot exceed 8,192 characters.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform