Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using command literal gets 'string too long to fit' erro
Message
 
 
To
01/04/2002 15:19:44
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00639649
Message ID:
00639766
Views:
15
The Maximum # of characters per command line is 8,192. See 'Visual FoxPro System Capacities' in the help file.
In case like that you can try to split one big select into multiple selects. For example, first select would include Where and Order By clause but select all fields into cursor. The second one would select only requested fields from the first cursor.

>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!
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform