Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using command literal gets 'string too long to fit' erro
Message
De
09/04/2002 13:41:14
 
 
À
01/04/2002 15:19:44
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00639649
Message ID:
00642784
Vues:
8
Instead of putting the whole statement into 1 string, put it into 2 or three portions:

Try:
local lcTables, lcFilters
lcTables = [mytables]
lcFilter = [myfilters]

select &lcTables where &lcFilters



>I have mySQLString to hold the SQL SELECT statement that the user builts. mySQLString varies in length, depending on what user wants. Sometimes this string can grow really long (user selects many fields, many filters & sort order). Once mySQLString is built, I use &mySQLString to execute the SELECT Statement built in mySQLString.
>
>Example:
>mySQLString='SELECT * FROM myTable'
>&mySQLString
>
>This works fine if mySQLString is of reasonable length. But when it gets very lengthy, I get 'String too long to fit' error (user can customize mySQLString so that mySQLString changes all the time). I've read somewhere that the max. length of command literal is 8000 bytes. How do I get around this?
>
>Thanks all!
Bill Morris
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform