Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SqlExec- Argument too Long
Message
 
 
À
13/07/2005 00:44:18
Aman Bains
Jaguar Computers
Jalandhar, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Versions des environnements
Visual FoxPro:
VFP 9
Database:
MS SQL Server
Divers
Thread ID:
01032048
Message ID:
01032057
Vues:
31
This message has been marked as the solution to the initial question of the thread.
Aman,

No string constant in VFP can exceed 255 characters. String variables can vastly exceed this. So you have to split your string constants up into pieces less that 255 characters:
lcSQL = "select ...." + ; && where what is inside the " is less than 255 characters
   " from ..." + ;
   " where ... "

SQLExec( ... lcSQL )
In VFP8 and later you can use the new textmerge functionality:
text to lcSQL textmerge noshow
select ...
   from ...
   where ...
endtext

? lcSQL
which has the benefit that you can easily copy/paste sql statements between VFP and QueryAnalyzer.

>I am migrating to SQL Server as backend. I will be using VFP 9 in future. At the moment I have VFP 6 & 8 available, but the application is in VFP 6.
>
>I tried run a long sql statement using SqlExec function. VFP Error "Expression too long- String length > 255 characters" is shown. I use complex VFP SQL statements for reporting. The only way I figured was to migrate these to SQL Server format & run using SQLEXEC. I read something about Cursor Adapter, but have not used it.
>
>1) Is there any other method / technique to run long queries?
>2) Does Cursor Adapter retrive one table at a time? or can it be used for complex querries?
>
>Aman
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform