Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Max Length of Parameter String
Message
From
12/02/2008 19:05:24
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
12/02/2008 17:13:09
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgia, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01291970
Message ID:
01291983
Views:
19
>I am trying to pass a parameter to a WebService. The specifications call for an XML string to be passed. I am getting the kind of error that occurs when a string is too long. Can anyone tell me the maximum length of a string that can be passed as a parameter in VFP? Thanks.
CLEAR
MyString = REPLICATE("x", 1e7)
MySTring2 = ""
FOR i = 1 TO 10
	MySTring2 = MySTring2 + MyString
next
MyFunc(MyString2)

FUNCTION MyFunc(x)
? LEN(x)
ENDFUNC
Tested in VFP 9 with SP2. In other words, it works up to a length of 1e8 (100 million characters).

If I increase the string to a billion characters, I get a fatal error eventually. But I think the problem is with creating the string, not with passing the parameter. You can do additional tests for yourself, to see exactly where it fails; but if "at least 100 million" is sufficient for an answer, then of course no additional tests are required.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform