HELP-VisFox6-Query-Line-Too-Long 
Author Message
 HELP-VisFox6-Query-Line-Too-Long

Is there any way to get around the apparent 256-character query line
length limit.

My app is generating the query in a single variable:

a = "select * from sfc where "
...
...
a=a+" thisfield = 5  and "
...
...
a=a+"..." etc

then I execute  "&a"

the line gets to 256 characters prety fast.  I had expected to be
limited to 8192 (when looking at maxes in help... the max command line
length). Is there some coding trick that will allow my app to approach
this number... or at least exceed 255  with the query line??????

TIA
Chuck



Wed, 03 Mar 2004 03:13:01 GMT  
 HELP-VisFox6-Query-Line-Too-Long
Maybe your SQL itself is too complex.  It's not the 255 character limit
that's the problem.

Try setting your SYS(3055, 1024).

See the help for SYS(3055) for more details.

--
Fred
Microsoft Visual FoxPro MVP
Please respond only to the newsgroups so that all may benefit.


Quote:
> Is there any way to get around the apparent 256-character query line
> length limit.

> My app is generating the query in a single variable:

> a = "select * from sfc where "
> ...
> ...
> a=a+" thisfield = 5  and "
> ...
> ...
> a=a+"..." etc

> then I execute  "&a"

> the line gets to 256 characters prety fast.  I had expected to be
> limited to 8192 (when looking at maxes in help... the max command line
> length). Is there some coding trick that will allow my app to approach
> this number... or at least exceed 255  with the query line??????

> TIA
> Chuck



Wed, 03 Mar 2004 07:34:34 GMT  
 HELP-VisFox6-Query-Line-Too-Long
Hi
The 256 char limit applies to the lenght of a string enclosed in quote
signs. A varible that contains a command can be 8000+ chars long. Try and
execute &a instead of "&a".
-Anders


Quote:
> Is there any way to get around the apparent 256-character query line
> length limit.

> My app is generating the query in a single variable:

> a = "select * from sfc where "
> ...
> ...
> a=a+" thisfield = 5  and "
> ...
> ...
> a=a+"..." etc

> then I execute  "&a"

> the line gets to 256 characters prety fast.  I had expected to be
> limited to 8192 (when looking at maxes in help... the max command line
> length). Is there some coding trick that will allow my app to approach
> this number... or at least exceed 255  with the query line??????

> TIA
> Chuck



Thu, 04 Mar 2004 08:15:54 GMT  
 HELP-VisFox6-Query-Line-Too-Long
The case for the problem is limit to 256 characters for strings? not for
select command.
For the solution you can make prg-file with this select command on-the-fly
and call it. It will be slow, but must work!
You can also use macro-substitution like

a1 = " thisfield = 5"
select * from sfc where &a1

and so on
Good luck
Aleksander


Quote:
> Is there any way to get around the apparent 256-character query line
> length limit.

> My app is generating the query in a single variable:

> a = "select * from sfc where "
> ...
> ...
> a=a+" thisfield = 5  and "
> ...
> ...
> a=a+"..." etc

> then I execute  "&a"

> the line gets to 256 characters prety fast.  I had expected to be
> limited to 8192 (when looking at maxes in help... the max command line
> length). Is there some coding trick that will allow my app to approach
> this number... or at least exceed 255  with the query line??????

> TIA
> Chuck



Sat, 06 Mar 2004 18:48:45 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. HELP- VisFox6 Query-line-too-long

2. +++GET YOUR FREE PENTIUM CELERON-300+++____________________________________________________________________________________________w5eoiu5ourerktjw erhtkjw885 woiwr oiwre

3. Copywrite/Distribution/Marketing warstories

4. Cancelling Queries --- HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

5. =?NS_4551-1?Q?Running_multiple_=28or_at_least_two=29_instances?= =?NS_4551-1?Q?_of_FoxPro_2=2E6w_screen?=

6. Help Help Help PLEASE!!!!!!!!!!!!!!!!!!!!!!!!!!

7. US-Nationwide-ORACLE-Ingres-Ingres-PowerBuilder-Progress-SYBASE-SQL-Developer 20

8. needed Immediately Plant Manager:!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

9. help me help me hhhhhhhheeeeeeeelllllllpppppppp meeeeeeeee

10. Query with Where-lines from a memo VFP6/SP3

11. no se lo

 

 
Powered by phpBB® Forum Software